K
ker_01
I have a table that has 17 /or/ 19 rows, and some rows have 2 cells, while
others have 3.
I think that the best way to cycle through the table to pull every value is
something like:
For EachColumn = 1 to 19
For EachRow = 1 to 3
'do stuff
Next EachRow
Next EachColumn
but I need to only "do stuff" if that cell actually exists; right now it
hits the first row where there are 2 cells instead of three, and throws a
runtime error 5941 "the requested member of the collection does not exist".
What is the appropriate syntax to determine if the table cell exists before
I try to process anything related to that cell? Something like:
If MyWordDocument.Tables(1).Cell(EachRow, EachColumn).Exists then...
Many thanks!
Keith
others have 3.
I think that the best way to cycle through the table to pull every value is
something like:
For EachColumn = 1 to 19
For EachRow = 1 to 3
'do stuff
Next EachRow
Next EachColumn
but I need to only "do stuff" if that cell actually exists; right now it
hits the first row where there are 2 cells instead of three, and throws a
runtime error 5941 "the requested member of the collection does not exist".
What is the appropriate syntax to determine if the table cell exists before
I try to process anything related to that cell? Something like:
If MyWordDocument.Tables(1).Cell(EachRow, EachColumn).Exists then...
Many thanks!
Keith