Edit: Hagar: changed title. |
Can we have a hyperlink in a form?
Can we have a hyperlink in a form?
can you make an entry in a form a hyperlink so that by clicking it in the form view you can visit the url of the link? if so, how?
OOo 2.3.X on Mandriva + windows xp
Re: hyperlink
No, unfortunately hyperlink fields are desperately missing. I tried to write a most simple workaround aimed to handle all sorts of URLs with a little bit of adjustment: [Solved] How to Open a PDF from a form
If your URLs in the database are typical ones including the protocol (such as "http:") then you are done with copying the code into the suggested directory, add a button named "URL_Button" to your form, add the URL-field name as "Additional Information" to the button and assign the form's record-change event to macro "url_on_record_change".
The button will open the hyperlink contained in the specified field then.
If your URLs in the database are typical ones including the protocol (such as "http:") then you are done with copying the code into the suggested directory, add a button named "URL_Button" to your form, add the URL-field name as "Additional Information" to the button and assign the form's record-change event to macro "url_on_record_change".
The button will open the hyperlink contained in the specified field then.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Volunteer
- Posts: 283
- Joined: Tue Dec 04, 2007 6:38 pm
- Location: Houston, TX
Re: hyperlink
Also, If your URL is in a text box, you can do something like this
Code: Select all
Sub BrowseURL(Event As Object)
REM CODE BOUND TO CLICK EVENT OF TEXT BOX
Dim Browser As String
Browser="C:\Program Files\Mozilla Firefox\firefox.exe"
Shell(Browser & " " & Event.Source.Text)
End Sub
- Hagar Delest
- Moderator
- Posts: 33366
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Can we have a hyperlink in a form?
Seems to be that one: Issue 20318 - Q-PCD Database-25: new form controls (multimedia and hyperlink).
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE Faye) and 24.8 portable on Windows 11.
Re: Can we have a hyperlink in a form?
I think I get the hang of these answers, basically it is assigning a macro to a button which will read the data (a URL) and run it in Firefox - yes?
my reason for using OpenBase is so I get cross platform usability as I need to switch between Windows (which I still depend on for certain software tools) and Linux (which I am still getting into)
if I set up a macro when using Windows XP will it work when using that database file under Linux?
my reason for using OpenBase is so I get cross platform usability as I need to switch between Windows (which I still depend on for certain software tools) and Linux (which I am still getting into)
if I set up a macro when using Windows XP will it work when using that database file under Linux?
OOo 2.3.X on Mandriva + windows xp
-
- Volunteer
- Posts: 283
- Joined: Tue Dec 04, 2007 6:38 pm
- Location: Houston, TX
Re: Can we have a hyperlink in a form?
Yes, the only exceptions is system specific items such as paths/urls. These are of coarse diffent in windows and linux. use the built-in function GuiType to determine operating system. If function returns 1 for windows and 4 for linux. not sure about value for mac/other