Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eliminate hyperlinks
Message
From
04/03/2005 14:42:18
 
 
To
04/03/2005 09:57:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Microsoft Office
Category:
Word
Miscellaneous
Thread ID:
00992725
Message ID:
00992860
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>In some documents, I want to eliminate all hyperlinks - keeping the texts. Is there any systematic way of doing this? I tried, with some success, to Copy, and then "Paste special", and select unformatted text - even works for several consecutive cells in a table. But other formats might get lost, too.

You should be able to do it by iterating through all the hyperlinks in a range and calling the Delete method, which appears to remove the link while leaving the text in place. Rough example to handle entire document (easy to change):
oWd = CREATEOBJECT("Word.Application")
oDoc = oWd.Documents.Open(GETFILE("doc"))
oLinks = oDoc.Range.Hyperlinks
FOR EACH oLink IN oLinks
  oLink.Delete
ENDFOR
oDoc.SaveAs( ...  && or Save() to overwrite
-- Randy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform