Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
I have a document with a large number of hyperlinks in it. I wish to turn
off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
Had the same problem myself.
Try the following: Sub ChangeHyperlinkField() Dim iFld As Integer Dim strCodes As String Selection.HomeKey strCodes = ActiveDocument.ActiveWindow.View.ShowFieldCodes ActiveDocument.ActiveWindow.View.ShowFieldCodes = True For iFld = ActiveDocument.Fields.Count To 1 Step -1 With ActiveDocument.Fields(iFld) .Unlink End With Next iFld ActiveDocument.ActiveWindow.View.ShowFieldCodes = strCodes End Sub Hope it helps. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
PS.
Thank Graham Mayor for the code. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
The macro above will unlink _all_ types of fields (cross-references, TOC,
etc.). To prevent this and unlink only hyperlinks, replace: .delete by If .Type = wdFieldHyperlink Then .Unlink End If -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Brian" wrote: Had the same problem myself. Try the following: Sub ChangeHyperlinkField() Dim iFld As Integer Dim strCodes As String Selection.HomeKey strCodes = ActiveDocument.ActiveWindow.View.ShowFieldCodes ActiveDocument.ActiveWindow.View.ShowFieldCodes = True For iFld = ActiveDocument.Fields.Count To 1 Step -1 With ActiveDocument.Fields(iFld) .Unlink End With Next iFld ActiveDocument.ActiveWindow.View.ShowFieldCodes = strCodes End Sub Hope it helps. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
Surely this would be easier - from Word Help
Click the Microsoft Office Button , and then click Word Options. Click Proofing. Click AutoCorrect Options, and then click the AutoFormat As You Type tab. Select the Internet and network paths with hyperlinks check box. Mike "Brian" wrote: PS. Thank Graham Mayor for the code. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
Changing the settings in "Autoformat As You Type" will not affect existing
text - it only affects text you type after changing the settings. Therefore, the existing hyperlinks will not be changed to normal text even if you turn off "Internet and network paths with hyperlinks"). --- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Mandarin" wrote: Surely this would be easier - from Word Help Click the Microsoft Office Button , and then click Word Options. Click Proofing. Click AutoCorrect Options, and then click the AutoFormat As You Type tab. Select the Internet and network paths with hyperlinks check box. Mike "Brian" wrote: PS. Thank Graham Mayor for the code. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
Hi Mike,
The AutoFormatting will convert plain text into hyperlinks, but it won't remove hyperlinks that already exist. That's what the code does. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Mandarin wrote: Surely this would be easier - from Word Help Click the Microsoft Office Button , and then click Word Options. Click Proofing. Click AutoCorrect Options, and then click the AutoFormat As You Type tab. Select the Internet and network paths with hyperlinks check box. Mike "Brian" wrote: PS. Thank Graham Mayor for the code. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
When you go to the AutoFormat taab and uncheck Internet and network paths
with hyperlinks, how does that play in vs. unchecking the same box in AutoFormat as you Type? Arlene "Jay Freedman" wrote: Hi Mike, The AutoFormatting will convert plain text into hyperlinks, but it won't remove hyperlinks that already exist. That's what the code does. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Mandarin wrote: Surely this would be easier - from Word Help Click the Microsoft Office Button , and then click Word Options. Click Proofing. Click AutoCorrect Options, and then click the AutoFormat As You Type tab. Select the Internet and network paths with hyperlinks check box. Mike "Brian" wrote: PS. Thank Graham Mayor for the code. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
AutoFormat As You Type settings are applied automatically as you type;
AutoFormat settings are applied when you manually run the AutoFormat command in Word. (Note that the AutoFormat command is not available by default in Word 2007, but you can add it to the Quick Access Toolbar, if you want to use it. See the "Where is the AutoFormat feature?" help topic.) -- Stefan Blom Microsoft Word MVP "Arlene" wrote in message news When you go to the AutoFormat taab and uncheck Internet and network paths with hyperlinks, how does that play in vs. unchecking the same box in AutoFormat as you Type? Arlene "Jay Freedman" wrote: Hi Mike, The AutoFormatting will convert plain text into hyperlinks, but it won't remove hyperlinks that already exist. That's what the code does. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. Mandarin wrote: Surely this would be easier - from Word Help Click the Microsoft Office Button , and then click Word Options. Click Proofing. Click AutoCorrect Options, and then click the AutoFormat As You Type tab. Select the Internet and network paths with hyperlinks check box. Mike "Brian" wrote: PS. Thank Graham Mayor for the code. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#10
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
I wish I knew what you were talking about, this is way over my head.
"Brian" wrote: Had the same problem myself. Try the following: Sub ChangeHyperlinkField() Dim iFld As Integer Dim strCodes As String Selection.HomeKey strCodes = ActiveDocument.ActiveWindow.View.ShowFieldCodes ActiveDocument.ActiveWindow.View.ShowFieldCodes = True For iFld = ActiveDocument.Fields.Count To 1 Step -1 With ActiveDocument.Fields(iFld) .Unlink End With Next iFld ActiveDocument.ActiveWindow.View.ShowFieldCodes = strCodes End Sub Hope it helps. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
#11
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I globally turn off hyperlink formatting?
As far as I can tell, Brian's code does nothing but unlinks all fields in
the main body of the document; this is not necessarily desirable (since fields are also used for certain types of numbering, tables of contents, and cross-references in Word). Besides, unlinking all fields (if that is what you want) can be done more easily with built-in commands: Ctrl+A (to select all) and then Ctrl+Shift+F9 (to unlink all fields). For more useful answers, see the "Remove all Hyperlinks from document" thread in this newsgroup. -- Stefan Blom Microsoft Word MVP "DonD" wrote in message ... I wish I knew what you were talking about, this is way over my head. "Brian" wrote: Had the same problem myself. Try the following: Sub ChangeHyperlinkField() Dim iFld As Integer Dim strCodes As String Selection.HomeKey strCodes = ActiveDocument.ActiveWindow.View.ShowFieldCodes ActiveDocument.ActiveWindow.View.ShowFieldCodes = True For iFld = ActiveDocument.Fields.Count To 1 Step -1 With ActiveDocument.Fields(iFld) .Unlink End With Next iFld ActiveDocument.ActiveWindow.View.ShowFieldCodes = strCodes End Sub Hope it helps. -- Brian McCaffery "Viking" wrote: I have a document with a large number of hyperlinks in it. I wish to turn off the hyperlink formatting globally. I know how to do this on individual links, but not how to do the entire document at one time. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
turn off the automatic formatting of email addresses to hyperlink. | Microsoft Word Help | |||
How do I globally and entirely turn-off autoformating in styles | Microsoft Word Help | |||
Can you turn off Smart Tags globally? | Microsoft Word Help | |||
Hyperlink from an image does not turn into a hand | Microsoft Word Help | |||
Word applies local formatting changes globally. Why? | Microsoft Word Help |