I want to put data into tables in a word document from multiple sheets.
The word document can be changed by the user including introducing new tables.
When I enter a new table in the word document data is exported to the wrong place.
I am using:
Is it possible to assign a name to the table instead of using its position in the word document?![]()
Set xclRange = xclSheet.Range("A1").CurrentRegion For lnIncre = 1 To xclRange.Rows.Count For clIncre = 1 To xclRange.Columns.Count wrdDoc.Tables(3).Cell(lnIncre, clIncre).Range = xclRange(lnIncre, clIncre) Next clIncre Next lnIncre
Tables(My_Table_Name) instead of Tables(3) ?
I thought using bookmarks but prefer avoid that solution.
-----
I am new user of VBA and excuse my English.
I attached the files to clarify the question
Thank's in advance.
xcll_SPECIM.xlsm
wrd_SPECIM.docx
wrd_SPECIM_ALT.docx
Bookmarks