9 replies
by kesl
by kesl
by bfilmfan
by kesl
Poster rated this answer.
I have already read that complete thread. The references there and the example macros strip ALL hyperlinks. I want to strip select (external) hyperlinks leaving text.
by hal 9000
Then your only solution is to write a Macro that allows you to select what Hyperlinks to remove.
Most of the existing pieces of code are specifically written to remove [b]ALL HYPERLINKS[/b] from any document.
Col
by redddis
Probably you could easily alter one of those scripts. The only thing
you need to do is to add an extra if, which checks whether the
hyperlink is external (starts from http://). voila.
by mjhf
Here is a macro that Abigail Parker wrote for me to remove hyperlinks in the footnotes or endnotes of a Word document. See if this helps others.
Sub RemoveHyperLinksEndnotes()
'
' RemoveHyperLinksEndnotes Macro
' Macro recorded 5/20/2009 by Abigail Parker
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^e"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found Then
If ActiveWindow.ActivePane.View.Type = wdPageView Or ActiveWindow. _
ActivePane.View.Type = wdOnlineView Or ActiveWindow.ActivePane.View.Type _
= wdPrintPreview Then
ActiveWindow.View.SeekView = wdSeekEndnotes
Else
ActiveWindow.View.SplitSpecial = wdPaneEndnotes
End If
Selection.WholeStory
Dim i As Integer
For i = Selection.Hyperlinks.Count To 1 Step -1
Selection.Hyperlinks(i).Delete
Next i
' ActiveWindow.ActivePane.Close
End If
End Sub
Sub RemoveHyperLinksFootnotes()
'
' RemoveHyperLinksFootnotes Macro
' Macro recorded 5/20/2009 by Abigail Parker
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^f"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
If Selection.Find.Found Then
If ActiveWindow.ActivePane.View.Type = wdPageView Or ActiveWindow. _
ActivePane.View.Type = wdOnlineView Or ActiveWindow.ActivePane.View.Type _
= wdPrintPreview Then
ActiveWindow.View.SeekView = wdSeekFootnotes
Else
ActiveWindow.View.SplitSpecial = wdPaneFootnotes
End If
Selection.WholeStory
Dim i As Integer
For i = Selection.Hyperlinks.Count To 1 Step -1
Selection.Hyperlinks(i).Delete
Next i
' ActiveWindow.ActivePane.Close
End If
End Sub
by jerang-
by viruser
This discussion is closed to new replies.
Trending Software posts
Sort by Trending