Libre Office Writerを使用してテキストフィールドにテキストを追加するのに役立ちます。

Libre Office Writerを使用してテキストフィールドにテキストを追加するのに役立ちます。

こんにちは。私はテキストフィールドにテキストを追加し、テキストフィールドにいくつかのテキストを入力するためのLO基本マクロを作成しようとしています。

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 = "Textfield" & Cstr(l)
l=l+1

役に立ちましたか?ユハをフォロー

ベストアンサー1

確認してくださいここ確認するここそしてここ。このリンクがあなたに役立つことを願っています。

おすすめ記事