Hi I am trying to create LO Basic Macro that add text with text field, and put some text to text fields like this:
If l>2 Then
'not first time, insert file after Doc5
oText = Doc4.getText()
oText2 = oText
oText.insertString( oText.End, oText2, False ) 'THIS IS NOT WORKING
oText.insertObject( oText.End, oText2, False ) 'THIS IS NOT WORKING
Else
Doc5 = StarDesktop.loadComponentFromURL(file1, "_hidden", 0, Dummy) 'open copied file
Doc4 = Doc5
End If
oForm = Doc5.Drawpage.Forms.getByName("Form") 'Get Form'
oField = oForm.getByName("Textfield 1") 'Get access to field'
oField.Text = "some text..."
'Change name to text field, there is no need to use it any more, and new page in next round will have the textfield 1 -name
oField.Name = "Text Field" & Cstr(l)
l=l+1
Any help, Juha