OpenOfficeWriterで現在選択されているテキストを変更および置換するマクロを作成しようとしています。
これまでのところ、私のマクロは次のようになっています。
sub myReplaceSelection
Dim oDoc
Dim oVC
Dim R As String
oDoc = ThisComponent
oVC = oDoc.CurrentController.getViewCursor
If Len(oVC.String) > 0 Then
R = processSelection(oVC.String)
'replace the selection:
'which function should I call here ? <------------------
'
EndIf
End sub
Function processSelection( s As String) As String
'... ok , this part works fine
End Function
現在選択されているテキストを文字列'R'に置き換えるにはどうすればよいですか?
ありがとう