I am creating an MS Word document through automation from an MS Access form. In this Word document I insert multiple .dot templates containing predefined tables using the following code:
wordobj.Selection.InsertFile FileName := file name ....
My question is, since the number of tables (.dot templates) that get inserted varies depending on existing data , how do I reference each table other than by its index number. I need to be able to bounce back and forth between tables. Currently I'm using the following code to reference a particular cell within a table:
However, this hard-coded index reference assumes that all previous tables have been inserted which may not always be the case.
Thanks in advance,