I typically use an Action Button on a Form with the following macro, to open a webpage:
Sub OpenLink
oForm = ThisComponent.Drawpage.Forms.getByName(“frmMovies”)
DocCtl = ThisComponent.getCurrentController()
oField = oForm.getByName(“txtIMDB”)
oButton = oForm.getByName(“OpenIMDB”)
CtlView = DocCtl.GetControl(oField)
oButton.TargetUrl = CtlView.Text
End sub
So far, so good, but now I have “oField” and “oButton” in a SubForm and I still don’t know how to use “oSubForm” in this macro. Could someone help me?
Thank you in advance.
I use LibreOffice Base 25.8.4