The following code will go through each line of the document and display the text.
DEFINE VARIABLE hWord AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE hDocument AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE intLine AS INTEGER NO-UNDO.
DEFINE VARIABLE strLine AS CHARACTER NO-UNDO.
CREATE "Word.Application" hWord.
hWord:Visible = False.
hDocument = hWord
ocuments:Open("c:\test.doc").
DO intLine = 1 TO hDocument:ComputeStatistics(1):
hWord:Selection:GoTo(3,1,intLine).
hWord:Selection:MoveEnd(5, 1).
ASSIGN strLine = hWord:Selection:Text.
MESSAGE strLine.
END.
hWord:QUIT.
RELEASE OBJECT hWord NO-ERROR.
RELEASE OBJECT hDocument NO-ERROR.