Download WDReportCom User Manual
Transcript
Set wdApp = New Word.Application Set wdrpt = New WDReport Call wdrpt.WordReport(wdApp, “customer_list.wrf”) 5.2.9 GetTableByIndex Method Returns a Word.Table object by using the table index. Syntax object.GetTableByIndex(Document, Index) object Required. The object is the WDReport object. Document Required. An object variable that represents the Word.Document object. Index Required. A string that represents the index of the table. The index number starts at 1. For examples, table 2 is the second table in the document. The index number of a nested table likes 2-1-2. For examples, table 2-1 is the first table inside table 2, and table 2-1-2 is the second table inside table 2-1. The max nested level WDReportCom supports is 3. Example This example uses GetTableByIndex method to get the first table in the document. Dim wdDoc As Word.Document Dim wdTable As Word.Table …… Set wdTable = mwdrpt.GetTableByIndex(wdDoc, "1") - 55 -