Sample Code:
Sub Main()
' Create the Word objects
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add
Set objRng = objDoc.Bookmarks("\endofdoc").Range
objWord.Visible = true
Call Word_log (objLine, objRng)
End Sub
' Subroutine to export the host screen data
Sub Word_log (objLine, objRng)
nRow = FlexScreen.Rows
nCol = FlexScreen.Columns
For i = 1 to nRow
objLine = FlexScreen.GetText(FlexScreen.Position(i, 1), nCol)
objRng.InsertAfter objLine
objRng.InsertAfter vbCRLF
Next
End Sub