Andrew Douglas Pitonyak wrote:
Jens Ansorg wrote:

Yes, that works here too. I get the desired textbox. Now I need to figure out whether it is possible to get the selected text inside that textbox.


something like
oDoc.getCurrentSelection()

unfortunately only works on the writer page behind the form


thank you for all the sample code

Jens


You get that from the view....

 Dim oController
 Dim oControlView

 GlobalScope.BasicLibraries.LoadLibrary("Tools")
 oController = ThisComponent.getCurrentController()
 REM Look in the tools library, the ModulesControl module.
 oControlView = GetControlView(ThisComponent, oController, "TextBox1")
 MsgBox oControlView.getSelectedText()


Great!
that was the missing peace. Together with an inputBox and some string functions I do now have the desired macro to add tags to selected text in my database form


thank you

Jens


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to