2
我試圖創建一個宏,它將更改並替換OpenOffice Writer中當前選定的文本。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
我如何用我的字符串「R」替換當前選中的文本?
感謝
甚至simplier: 'oVC.setString(processSelection(oVC.String))' – Pierre