VBA is a programming language so I’ll assume this question is ok on SO.
What API calls and other techniques can I use, to extract specific tables from an MS-Word document?
I need to write a program which will open several Word documents, and look inside for tables which have a certain text in Row 1 Column 1, and output those tables to another file, preferrably as cells in an Excel spreadsheet.
Is this possible? How would you tackle this? Where to start?
Thanks
The
Document.Tablescollection contains all tables in a document.Each
Tablein this collection has certain properties, such as.Rows,.Columns, or.Cell, which give access to a given row, a given column or a given cell.The
Table.Range.Copymethod copies the given table to the clipboard.The
Worksheet.Pastemethod pastes the copied table into an Excel sheet, using the currently active cell as the insertion point.