Hi Bear,
I'm also generally in favour of using a global Find-Replace method
whenever possible. But as Barry asked for a macro, you'd help him more
by explaing the Selection. (or Range.) Find.Execute method, rather
than a dialog box - but Barry will figure it out, I'm sure.
Now a document may contain malformed text (one tag with no closing >).
Most HTML processors have a policy of defaulting on the side of
safety. It is safe to test whether the text to delete contains, for
example, a paragraph mark - or a second opening < before > is found,
of course observing possible nested levels of < and >'s), because in a
many cases, that's an indicator that *perhaps* we hit malformed HTML,
and that it's worth asking the user before deleting 10 pages. Only a
macro can test that, IMO.
Next is the question of whether the window is in a view mode that
display field codes. Problem is, if the document contains fields, a
Find-Replace will either act on the field's "visible" result or on the
field's code, depending on which view mode you're in. A macro can do
the necessary verification, and if necessary, will change the view
mode.
Cheers,
Yves Champollion
> Barry:
>
[quoted text clipped - 25 lines]
> --
> Windows XP, Word 2000