F
Fool
I need to delete all the hyperlinks in a document. The following code
deletes *every other* hyperlink.
For Each oHyp In ActiveDocument.Hyperlinks
oHyp.Range.Hyperlinks(1).Delete
Next
I made the code functional by adding a While Loop (below), but it's
rather inefficent. It doesn't seem like the While loop should be
necessary, but it is. Why?
While ActiveDocument.Hyperlinks.Count > 0
For Each oHyp In ActiveDocument.Hyperlinks
oHyp.Range.Hyperlinks(1).Delete
Next
Wend
Thanks.
deletes *every other* hyperlink.
For Each oHyp In ActiveDocument.Hyperlinks
oHyp.Range.Hyperlinks(1).Delete
Next
I made the code functional by adding a While Loop (below), but it's
rather inefficent. It doesn't seem like the While loop should be
necessary, but it is. Why?
While ActiveDocument.Hyperlinks.Count > 0
For Each oHyp In ActiveDocument.Hyperlinks
oHyp.Range.Hyperlinks(1).Delete
Next
Wend
Thanks.