我正在尝试创建一个宏来更改和替换 OpenOffice Writer 中当前选定的文本。
到目前为止,我的宏看起来像这样:
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
如何用我的 String 'R' 替换当前选定的文本?
谢谢