K
Kevin B
How does one identify a table's index number other than counting them?
I'm populating Word tables from a PowerBuilder application and as long as I
know the table's index number I can reference it from PowerBuilder without a
problem, but I have to count the table's position in the document manually in
order to determine what table I'm trying to populate.
I looped through all the tables in the target document using the code below
hoping I would get some table identifier, and all I got was 30 lines of
"Table Number:"
Sub TableIDs()
Dim doc As Document
Dim tbl As Table
Dim strTables As String
Dim i As Integer
Set doc = ThisDocument
i = 1
For Each tbl In doc.Tables
strTables = strTables & "Table Number: " & tbl.ID & vbCrLf
Next tbl
Debug.Print strTables
Set Doc = Nothing
End Sub
Thanks ahead of time.
I'm populating Word tables from a PowerBuilder application and as long as I
know the table's index number I can reference it from PowerBuilder without a
problem, but I have to count the table's position in the document manually in
order to determine what table I'm trying to populate.
I looped through all the tables in the target document using the code below
hoping I would get some table identifier, and all I got was 30 lines of
"Table Number:"
Sub TableIDs()
Dim doc As Document
Dim tbl As Table
Dim strTables As String
Dim i As Integer
Set doc = ThisDocument
i = 1
For Each tbl In doc.Tables
strTables = strTables & "Table Number: " & tbl.ID & vbCrLf
Next tbl
Debug.Print strTables
Set Doc = Nothing
End Sub
Thanks ahead of time.