Dim siar As Integer, siac As Integer
Set SIATable = SIADoc.Tables.Add(SIADoc.Bookmarks("\endofdoc").Range, rs.RecordCount, 7)
SIATable.Range.ParagraphFormat.SpaceAfter = 0
SIATable.Range.Font.Underline = wdUnderlineNone
SIADoc.Tables(1).Borders(wdBorderTop).LineStyle = wdLineStyleSingle
SIADoc.Tables(1).Borders(wdBorderLeft).LineStyle = wdLineStyleSingle
SIADoc.Tables(1).Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
SIADoc.Tables(1).Borders(wdBorderRight).LineStyle = wdLineStyleSingle
SIADoc.Tables(1).Borders(wdBorderHorizontal).LineStyle = wdLineStyleSingle
SIADoc.Tables(1).Borders(wdBorderVertical).LineStyle = wdLineStyleSingle
For siar = 1 To rs.RecordCount
For siac = 1 To 7
SIATable.Cell(siar, siac).Range.Text = rs(siac - 1).Value
SIATable.Rows(siar).Range.Font.Size = 9
SIATable.Rows(siar).Range.Font.Bold = False
Next
.MoveNext
Next
where can i put table headers, this code will loop on selected record on the table
how can i add date and time on the filename: SIADoc.SaveAs ("C:\Users\2mhzbrain\Desktop\Main Inventory - '"& DATE + TIME &"'.docx") this is not working, but this is what i want to happen on the file names. thanks