How can i select a value from item in a formulary.
I have a primary and a secondary formulari i want select a text from a text label of secondary formulary.
i try this
Code: Select all
Sub Main
Dim oDoc as Object
Dim Form as Object
Dim PrefissoWin as String
PrefissoWin = "D:\\"
oDoc = ThisComponent
DrawPage = oDoc.DrawPage
Form = DrawPage.Forms.GetByIndex(0)
'xray Form
'path = oDoc.getUrl()
FormPath = Form.hasByName("path")
'print FormPath
FormPath = Form.getByName("path")
'xray FormPath
PathCertificato = FormPath.text()
'print PathCertificato
NomeCertificato=Right(PathCertificato,42)
NomeCertificato=ConvertFromUrl(NomeCertificato)
'print NomeCertificato
PathWin= PrefissoWin & NomeCertificato
'print PathWin
Url="/utenti/brigliadori/corso_BASIC.pdf"
sDestUrl = ConvertToUrl(URL)
oSys = CreateUnoService("com.sun.star.system.SystemShellExecute")
oSys.execute(sDestUrl, "", 0)
End Sub
Thanks