Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Sesquipedalian Sam Sesquipedalian Sam is offline
external usenet poster
 
Posts: 126
Default Converting hyperlinks to plain text

Is there a way to convert only hyperlinks to plain text without
affecting other fields (such as page numbers, dates, etc.)?

Searching the archives, I found suggestions to use both Ctrl+Shift+F9
and also Ctrl+6. On my Word 2007 system, they seem to do the same
thing. They both convert all fields. Is there a difference?
  #2   Report Post  
Posted to microsoft.public.word.newusers
Lene Fredborg Lene Fredborg is offline
external usenet poster
 
Posts: 1,291
Default Converting hyperlinks to plain text

You can use the following macro:

Sub Hyperlinks_UnlinkAll()

Dim oField As Field
For Each oField In ActiveDocument.Fields
If oField.Type = wdFieldHyperlink Then
oField.Unlink
End If
Next oField

End Sub

For help on installing a macro, see:
http://www.gmayor.com/installing_macro.htm

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Sesquipedalian Sam" wrote:

Is there a way to convert only hyperlinks to plain text without
affecting other fields (such as page numbers, dates, etc.)?

Searching the archives, I found suggestions to use both Ctrl+Shift+F9
and also Ctrl+6. On my Word 2007 system, they seem to do the same
thing. They both convert all fields. Is there a difference?

  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Converting hyperlinks to plain text

There is no difference between the two keyboard shortcuts. They are merely
alternatives.

The approach to hyperlinks depends on what you want to achieve. If you don't
want hyperlinks in your document, then you could start by not inserting them
in the first place.
or
Turn off the autoformat as you type option to convert web and e-mail
addresses to hyperlinks
or
If you merely want to avoid the coloured formatting, change the Hyperlink
and Followed Hyperlink styles to match the underlying text.
or
If you really want to convert only Hyperlinks to text in one operation then
you can do that with a macro

Sub HyperlinksToText()
Dim oRng As Range
Dim iFld As Long
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type = wdFieldHyperlink Then
.Unlink
End If
End With
Next iFld
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Sesquipedalian Sam wrote:
Is there a way to convert only hyperlinks to plain text without
affecting other fields (such as page numbers, dates, etc.)?

Searching the archives, I found suggestions to use both Ctrl+Shift+F9
and also Ctrl+6. On my Word 2007 system, they seem to do the same
thing. They both convert all fields. Is there a difference?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loosing hyperlinks while forwarding a plain text newsletter. Alex Microsoft Word Help 0 September 15th 08 11:02 PM
Converting outline to plain text in Word LauraB Microsoft Word Help 4 May 28th 08 11:10 AM
Converting a URL to plain text? LurfysMa New Users 5 March 29th 06 11:55 PM
Converting field codes to plain text Civil jenny Microsoft Word Help 1 March 1st 06 08:30 PM
Converting textboxes to plain text RealGomer Microsoft Word Help 5 June 26th 05 10:40 PM


All times are GMT +1. The time now is 06:46 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"