Glad it's working. Actually that's a handy macro, isn't it? There are times I drag/drop content from a web page to Word, and would like just the text--not the links.
-- Randy
>
>Great! Yes, the MsgBox does what I want, and the IntelliSense helps a lot.
>
>Here is my Word Macro, for future reference, in case anyone needs it.
>
>
>Sub DeleteHyperlinks()
>'
>' This macro will delete all hyperlinks
>' in the current document,
>' while maintaining the visible text.
> If MsgBox("All hyperlinks in the current document will be deleted. Continue?", vbYesNo, _
> "Delete hyperlinks") = vbYes Then
> Set myDoc = Application.ActiveWindow.Document
> While myDoc.Hyperlinks.Count > 0
> myDoc.Hyperlinks(1).Delete
> Wend
> End If
>End Sub
>
>
>While I still don't know how to break out of a macro (like using RETURN in VFP), I managed to write this one without it.