[Solved] Show link-addresses in Writer

Discuss the word processor
Post Reply
mrk4372
Posts: 9
Joined: Sat Mar 20, 2021 1:56 pm

[Solved] Show link-addresses in Writer

Post by mrk4372 »

I'd like to save information from a Writer document in plain text (TXT) format.

The document includes lots of hyperlinks.

Can one reveal all link-addresses in a document so they can be included in a TXT file?

Doing this by hand for each link-address is tedious, so I'd like reveal all them in one operation if possible.
Last edited by MrProgrammer on Mon Aug 23, 2021 4:12 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
OpenOffice 4.1.9 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11345
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Show link-addresses in Writer

Post by Zizi64 »

Can you upload a small, ODF type sample file here?
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.
mrk4372
Posts: 9
Joined: Sat Mar 20, 2021 1:56 pm

Re: Show link-addresses in Writer

Post by mrk4372 »

I've uploaded a typical ODT file containing numerous links.
Attachments
example ODT with multiple links.odt
(15.59 KiB) Downloaded 173 times
OpenOffice 4.1.9 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11345
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Show link-addresses in Writer

Post by Zizi64 »

You can do it by usage the Macros. Here is some existing macros to generate URL list:

Try to import (copy-paste) the contents of your sample .odt file into a calc file, and then extract the URL-s by Villeroy's excellent cell functions from the Hyperlinks. Maybe you can use the result (located on the Sheet2 in my sample file) to create a .txt format list.

viewtopic.php?f=21&t=2762
Cell url.ods
(18.98 KiB) Downloaded 164 times
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.
cwolan
Posts: 127
Joined: Sun Feb 07, 2021 3:44 pm

Re: Show link-addresses in Writer

Post by cwolan »

The OP mentioned a Writer document.
Perhaps an extension called "Alternative dialog Find & Replace for Writer" will come in handy?

See:
https://extensions.openoffice.org/en/pr ... -altsearch

Download and install it. To launch either click the green icon on the new toolbar or choose 'Edit > Alt. Find & Replace'.

In the dialog:

1. the "Properties" list box - select "Hyperlink".
2. the "Replace:" list box - select "Returns hyperlink's URL of founded link \u".
3. Click the "Replace all" button.
Attachments
Screenshot.jpg
OpenOffice 1.1.5 – 4.1.15
LibreOffice 6.4.7 – 7.6.5
Windows 7,10,11 64-bit
mrk4372
Posts: 9
Joined: Sat Mar 20, 2021 1:56 pm

Re: Show link-addresses in Writer

Post by mrk4372 »

@Zizi
No success with the spreadsheet (but I've never used macros or spreadsheets before....)

@cwolan
Using your AltSearch tip I was able to convert links to text, so the link:

"Blender1.0/"

became the plain text:
"https://download.blender.org/release/Blender1.0/"

I wanted to retain the link as plain text, followed by the link address, like this:

"Blender1.0/ (https://download.blender.org/release/Blender1.0/)".

I've struggled for ages to do this with AltSearch. Do you know it it's possible?
OpenOffice 4.1.9 on Windows 7
cwolan
Posts: 127
Joined: Sun Feb 07, 2021 3:44 pm

Re: Show link-addresses in Writer

Post by cwolan »

I've struggled for ages to do this with AltSearch. Do you know it it's possible?
I barely know this extension. Based on the help file it provides (button labelled "?"):
you could try the following expression:

Code: Select all

\0 (\u)
And besides, the extension does not replace the first hyperlink properly (the one without displayed text) .
Why is that? As I stated earlier, I barely know this extension. :‑)
Attachments
Screenshot_1.jpg
OpenOffice 1.1.5 – 4.1.15
LibreOffice 6.4.7 – 7.6.5
Windows 7,10,11 64-bit
mrk4372
Posts: 9
Joined: Sat Mar 20, 2021 1:56 pm

Re: Show link-addresses in Writer

Post by mrk4372 »

SOLVED

@cwolan

Thanks for you help. The expression "\0 (\u)" worked perfectly.

After installling AltSearch I couldn't access its Help pages. Clicking on "?" produced an error mesage headed:

"Help: File of Help is impossible to open"

I've now downloaded the Help as a separate HTML file (from: http://macrojtb.hys.cz/HelpAltSearch_en.html) for future reference.
OpenOffice 4.1.9 on Windows 7
Post Reply