Fenrirshowl
Technical User
Hi guys
I have inherited over 1000 word documents contain tables. The tables have varying numbers of rows and columns but follow the same general format.
I need to read in the information in each row that has, say six columns, but ignore rows where cells have been merged and the column count for that row is less than six. The data is read into a txt file for speed for import to Excel on completion as a delimited file.
If a table has less than 6 columns the table is ignored.
I was hoping to use a FOR or WHILE loop referencing individual cells via objTab.Cell(x,y).Range.Text but y occasionally exceeds the number of columns for a given row.
I thought objTab.Rows(x).Columns.Count may work, but it didn't.
Any ideas?
Thank you in advance
Fen
I have inherited over 1000 word documents contain tables. The tables have varying numbers of rows and columns but follow the same general format.
I need to read in the information in each row that has, say six columns, but ignore rows where cells have been merged and the column count for that row is less than six. The data is read into a txt file for speed for import to Excel on completion as a delimited file.
If a table has less than 6 columns the table is ignored.
I was hoping to use a FOR or WHILE loop referencing individual cells via objTab.Cell(x,y).Range.Text but y occasionally exceeds the number of columns for a given row.
I thought objTab.Rows(x).Columns.Count may work, but it didn't.
Any ideas?
Thank you in advance
Fen