PDA

View Full Version : Reading data from Word document; selecting line after table



bifjamod
04-20-2016, 12:01 PM
I am working on a script to read data from a Word document; the first step in that process is to select the first text line after a table (each page in the document has a table, which is then followed by the desired data.)

The follow script works to select the table on each page, but does not then select the first line afterward. This is my first foray in to reading Word documents, so I may well be using the wrong instruction. Can anyone offer a suggestion?


Dim aTable As Word.Table
Dim rng As Word.Range
For Each aTable In ActiveDocument.Tables 'Selects (last) table, but does not move down to next line
aTable.Select
Selection.MoveDown Unit:=wdLine, Count:=2
Next aTable
End Sub