I tried recording a macro while doing a search/replace for the hyperlink
style (all the hyperlinks in the doc do have this style) and then removing
the link in the doc, It finds the hyperlink style, but does not remove the
hyperlink.
Can anyone suggest a sub that would do what I need?
Thank you
Terry
Sub remhyperlinks()
With ActiveDocument
Dim hl As Hyperlinks
Dim hlt As Hyperlink
Dim hlcnt As Integer
For Each hlt In ActiveDocument.Hyperlinks
hlt.Delete
Next hlt
End With
End Sub
Thank you
Terry
"Terry" <terr...@nbnet.nb.ca> wrote in message
news:k_sT7.5606$ud.7...@news-nb00s0.nbnet.nb.ca...
All the hyperlinks are stored as a collection. You are running through this
collection and deleting each member.
You can use the same basic code to delete all of the fields, tables,
paragraphs or anything else that is stored as a collection within a word
document. See VBA Help on "Collections"
Regards
Russell
"Terry" <terr...@nbnet.nb.ca> wrote in message
news:2gtT7.5608$ud.7...@news-nb00s0.nbnet.nb.ca...
Thank you Russell.
Just knowing that makes more of the code Ive written make more sense.
Again
Thank you
Terry V
"Russell Boyd" <rus...@dramadog.com> wrote in message
news:10086401...@ns2.1earth.net...