2.9.15

Как удалить гипрессылки из word (How to remove all hyperlinks in Word?)

   1. Right click on the hyperlink in document.
2. Click Remove Hyperlink from right-click menu.

It is easy to remove a hyperlink in this way, but to remove all hyperlinks in the document will require much time of right-clicking and removing one by one.

Remove all hyperlinks by using shortcuts

Lots of people prefer to use shortcuts, for they are simple and time-saving. Shortcut is available to remove all hyperlinks, and you don’t need to worry the document is too long.
1. Press “Ctrl-A” to select the whole document.
2. Press “Ctrl-Shift-F9”.
Note: The shortcut method will remove all underlying fields.

Remove all hyperlinks with VBA

ou can use the following VBA to remove all hyperlinks in Word.
1. Press “Alt-F11” to open the Microsoft Visual Basic for Application window;
2. Click Insert > Module, and then copy and paste the follow VBA code into the Module window.
3. Then click Run Sub button to run the script.
VBA Code 1: Remove all hyperlinks of current document
Sub KillTheHyperlinks()
' -----------------------------------------------
' Removes all hyperlinks from the document:
' Text to display is left intact
' -----------------------------------------------
With ThisDocument
' Loop while there are hyperlinks afoot!
While .Hyperlinks.Count > 0
.Hyperlinks(1).Delete
Wend
End With
' Shut this off, don't need anymore popping up
Application.Options.AutoFormatAsYouTypeReplaceHyperlinks = False
End Sub
Different to the first VBA code, which removes all hyperlinks in only current document, the second VBA code allows you to remove all hyperlinks in all open documents.
VAB code 2: Remove all hyperlinks in all open documents
Sub KillTheHyperlinksInAllOpenDocuments()
' -----------------------------------------------
' Removes all hyperlinks from any open documents
' Text to display is left intact
' -----------------------------------------------
Dim doc As Document
Dim szOpenDocName As String

' Loop through all open documents:
For Each doc In Application.Documents
' Store the document name
szOpenDocName = doc.Name
' Remove the hyperlinks from that document
With Documents(szOpenDocName)
' Loop while there are hyperlinks afoot!
While .Hyperlinks.Count > 0
.Hyperlinks(1).Delete
Wend
End With
' Shut this off, don't need anymore popping up
Application.Options.AutoFormatAsYouTypeReplaceHyperlinks = False
Next doc
End Sub


http://www.extendoffice.com/documents/word/635-word-remove-all-hyperlinks.html

Комментариев нет:

Отправить комментарий