Is there a Macro to convert an HTTP valid web address in an OpenOffice Calc Cell from Plain Text to a Clickable link.
I have discovered that if I simply add a space to the end of the http web link, the cell changes color and becomes clickable.
Can I do that with a Macro? I tried just adding a line saying:
oCell.string = WebLinkString & " ", but that does not seem to work.
Any suggestions?
[Solved] Macro to convert a HTTP valid web address from
[Solved] Macro to convert a HTTP valid web address from
Last edited by alf50 on Wed Dec 21, 2016 1:31 am, edited 1 time in total.
OpenOffice 4.1.14 on Mac Catalina(10.15.7), RasPi4B (TwisterOS-8/2023update) & MS Wnds10
Re: Macro to convert a HTTP valid web address from Plain Tex
I've had some, though not complete, success using the HYPERLINK function.
I don't know why, but it seems to work when the optional Display Text (2nd parameter) is included, but not when it is omitted.
I know you asked for a macro, but thought this might be a decent or temporary work around.
I don't know why, but it seems to work when the optional Display Text (2nd parameter) is included, but not when it is omitted.
I know you asked for a macro, but thought this might be a decent or temporary work around.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Re: Macro to convert a HTTP valid web address from Plain Tex
All of the cells contain more than one type of the content (in same time):oCell.string = WebLinkString & " "
oCell.String
oCell.Value
oCell.Formula
oCell.FormulaLocal
Your command will set the string only. Try to set the Formula as RusselB suggested:
Code: Select all
Sub SetLink
oDoc = Thiscomponent
oSheet = oDoc.Sheets.GetbyIndex(0)
oCell = oSheet.GetCellbyPosition(0,0)
sHlink = "http://portableapps.com/apps/office/libreoffice_portable"
sHlinkText = "LibreOffice Portable"
' The chr(34) is a " character.
oCell.Formula = "=HYPERLINK(" & chr(34) & sHlink & chr(34) & ";" & chr(34) & sHlinkText & chr(34) & ")"
End Sub
Last edited by Zizi64 on Fri Oct 18, 2019 12:13 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
- MrProgrammer
- Moderator
- Posts: 4908
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Macro to convert a HTTP valid web address from Plain Tex
There is no need for an evil macro. [Tutorial] Text to Columns, Q35/A35.alf50 wrote:Is there a Macro to convert an HTTP valid web address in an OpenOffice Calc Cell from Plain Text to a Clickable link.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).