[Solved] How to simultaneously remove all hyperlinks?
[Solved] How to simultaneously remove all hyperlinks?
Is there a way to simultaneously remove/disable all hyperlinks in a document (remove them all at once) ?
Last edited by Hagar Delest on Thu Sep 11, 2008 11:45 am, edited 1 time in total.
Reason: tagged the thread as Solved.
Reason: tagged the thread as Solved.
OOo 2.4.X on Ms Windows XP
Re: How to simultaneously remove all hyperlinks?
You can convert hyperlinks to plain text simply by removing their text formatting--yes, really. So, all you have to do is select the text for each link and remove the formatting (Format > Default Formatting).
The problem is, how to select all the links. Unfortunately, this isn't so easy.
You may be able to devise a regular expression that will do it, e.g. if all the links' text have some begins with "www." or ends with ".com", but it seems unlikely to be so simple.
It won't be all at once, but you can easily step through all the links using the Navigator (F5).
The problem is, how to select all the links. Unfortunately, this isn't so easy.
You may be able to devise a regular expression that will do it, e.g. if all the links' text have some begins with "www." or ends with ".com", but it seems unlikely to be so simple.
It won't be all at once, but you can easily step through all the links using the Navigator (F5).
AOO4/LO5 • Linux • Fedora 23
Re: How to simultaneously remove all hyperlinks?
Yeah, I know I can do one at a time -- am looking at a 22-page document full of hyperlinks, with more of these documents to come. However, I have found a work-around: save the document to MS Word 97 -- that kills the hyperlinks.
OOo 2.4.X on Ms Windows XP
Re: How to simultaneously remove all hyperlinks?
Try this macro on a backup copy.
Edit: New and much better version of this macro. http://user.services.openoffice.org/en/ ... 21&t=40598 |
Code: Select all
Sub Main
oDoc = ThisComponent
enum1 = oDoc.Text.createEnumeration
While enum1.hasMoreElements
thisPara = enum1.nextElement
enum2 = thisPara.createEnumeration
While enum2.hasMoreElements
thisPortion = enum2.nextElement
thisPortion.HyperlinkTarget = ""
thisPortion.HyperLinkURL = ""
Wend
Wend
End Sub
Last edited by JohnV on Thu Apr 28, 2011 9:45 pm, edited 1 time in total.
Re: How to simultaneously remove all hyperlinks?
JohnV ---
Excellent!
Thanks.
Jack
Excellent!
Thanks.
Jack
OOo 2.4.X on Ms Windows XP
Re: [Solved] How to simultaneously remove all hyperlinks?
Doesn't work on OpenOffice 3.1.1.
Code: Select all
BASIC Runtime Error
Error in this line: "enum2 = thisPara.createEnumeration"
Property or method not found.
OpenOffice 3.1.1 on Windows 7
Re: [Solved] How to simultaneously remove all hyperlinks?
I am surprised that OO does not have a Remove Hyperlinks feature; MS Word has had that at least since Word 97 (Tools/Macro/Macros/REMOVEHYPERLINKS).
OOo 2.4.X on Ms Windows XP
Re: [Solved] How to simultaneously remove all hyperlinks?
ysangkok,
OK, I took a look and I'll bet your document contains a table. I just threw this macro together and didn't consider or, for that matter, even think about the existence of tables in the document.
If I get a chance I'll address that issue.
OK, I took a look and I'll bet your document contains a table. I just threw this macro together and didn't consider or, for that matter, even think about the existence of tables in the document.
If I get a chance I'll address that issue.
Edit: New macro. http://user.services.openoffice.org/en/ ... 21&t=40598 |
Re: [Solved] How to simultaneously remove all hyperlinks?
While not simultaneously removing all the hyperlinks in a document, nevertheless there's a very easy, three-step way to accomplish this manually.
1. Select one of the items in the document that contains a hyperlink. Open the context menu and select "Remove Hyperlink."
2. Press CTRL+A to select the entire document.
3. Press CTRL+SHIFT+Y to "Repeat: Reset attributes"
Hope this helps someone in the future.
1. Select one of the items in the document that contains a hyperlink. Open the context menu and select "Remove Hyperlink."
2. Press CTRL+A to select the entire document.
3. Press CTRL+SHIFT+Y to "Repeat: Reset attributes"
Hope this helps someone in the future.
OpenOffice 3.4.1
Windows 7 Home Premium 64-bit
Windows 7 Home Premium 64-bit
Re: [Solved] How to simultaneously remove all hyperlinks?
Excellent!
Nice catch--and thanks for sharing the tip!
Nice catch--and thanks for sharing the tip!
AOO4/LO5 • Linux • Fedora 23
Re: [Solved] How to simultaneously remove all hyperlinks?
My version OO 3.3.0 in Calc does not have (right click) context menu option of "remove hyperlink".
Nor is "remove hyperlink" in any of the Menu items.
My solution was to Save As CSV, then open/import the CSV.
Nice clean spreadsheet, ready for my formulas/formatting.
I'm sure if your's is a Doc you could save a plain text (*.txt) file and that would do the same thing.
This is a solution for 1 sheet at a time, which surly beats 1 items at a time (find & replace).
I found this post via search and didn't realize until after I posted it was for Writer.
Nor is "remove hyperlink" in any of the Menu items.
My solution was to Save As CSV, then open/import the CSV.
Nice clean spreadsheet, ready for my formulas/formatting.
I'm sure if your's is a Doc you could save a plain text (*.txt) file and that would do the same thing.
This is a solution for 1 sheet at a time, which surly beats 1 items at a time (find & replace).
I found this post via search and didn't realize until after I posted it was for Writer.
OpenOffice 3.3.0 on Windows
-
- Posts: 1
- Joined: Mon Jun 30, 2014 6:39 pm
Re: [Solved] How to simultaneously remove all hyperlinks?
My context menu doesn't have "Remove Hyperlink", either - but it does have "default formatting". I selected the entire column of hyperlinked text, right clicked, then selected "default formatting" from the context menu, and the hyperlinks were done away with...
(I know it's an old thread but this tip may help someone else who, like me, stumbled onto this thread looking for the same solution.)
(I know it's an old thread but this tip may help someone else who, like me, stumbled onto this thread looking for the same solution.)
Pat Babcock in SE MI USA
OpenOffice 4.01 (but I update regularly) on Windows 7 Professional
OpenOffice 4.01 (but I update regularly) on Windows 7 Professional