I muddled through creating a simple macro that reads the contents of a plain text file and inserts it in the current Writer document:
Code: Select all
Sub Dummy()
ThisDoc=ThisComponent
ThisText=ThisDoc.Text
TheCursor=ThisText.createTextCursor
DummyTxt="dummy.txt"
f1 = FreeFile()
Open DummyTxt for Input as #f1
Do while NOT EOF(f1)
Line Input #f1, s
TheCursor.String=s
Loop
Close #f1
End Sub