How to reference more than one table in a Word doc
Hi Everyone,
First time here and a VBA noob.
I have one, multi-row, 3-column table in the doc. I've figured out this code to target a specific table cell and determine if its contents are within a certain character limit--if not, the writer gets an error message. This is just one of several If statements (all the same code, just checking different cells)
If Len(Selection.Tables(1).Cell(Row:=3, Column:=3).Range) > 40 Then
MsgBox "40 Char Description: Exceeded Character Limit of 40 " & "(" & Len(Selection.Tables(1).Cell(Row:=3, Column:=3).Range) - 2 & ")"
End If
Everything was fine until I was asked to add 3 more identical tables to the doc. Then I got: "The requested member of the collection does not exist"
Any thoughts?
Thanks everyone!
|