Jens Ansorg wrote:
Andrew Douglas Pitonyak wrote:
The following code works for me... I have a form called Standard,
which contains a form called Catalog, which contains a form called
Country, which contains a control called "TextBox_Country". The
second example, returns the Dealer form, which is contained in the
Standard form.
Sub Main
Dim x
x = getFromForm(ThisComponent, _
Array("Standard", "Catalog", "Country", "TextBox_Country"))
x = getFromForm(ThisComponent, Array("Standard", "Dealer"))
End Sub
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()
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm
Free Info: http://www.pitonyak.org/oo.php
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]