Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Word: Replace field code text with field code itself

Status
Not open for further replies.

sbilheimer

Technical User
Sep 24, 2003
8
US
How do you convert a url in MS Word (2000) to flat text. Not the Ctl-Shift-F9. Here is what I mean:

Text displayed: Get the News
Associated link:
I want to replace "Get the News" with the actual url- I've taken my website and am trying to convert it into a book. So seeing "Get the News" will not mean anything.

I hope this is clear. I've looked EVERYWHERE. There was a macro somewhere, but it kept blowing up.

Thanks. S
 
Hi sbilheimer,

For VBA you should really post in the VBA Forum and as I presume you know how to do this manually you must be seeking a code solution.

This should do it for all hyperlinks in a document
Code:
[blue]For Each k In ActiveDocument.Hyperlinks
    k.TextToDisplay = k.Address & IIf(k.SubAddress = "", "", "#") & k.SubAddress
Next[/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top