Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loosing hyperlinks while forwarding a plain text newsletter. | Microsoft Word Help | |||
Converting outline to plain text in Word | Microsoft Word Help | |||
Converting a URL to plain text? | New Users | |||
Converting field codes to plain text | Microsoft Word Help | |||
Converting textboxes to plain text | Microsoft Word Help |