Thanks for the solution. However, the solution adds unnecessary things to
the undo stack. Is there a cleaner way to do something similar?
TIA
I would not have thought that was such a great problem.
Add an
ActiveDocument.UndoClear
at the end

Signature
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> Thanks for the solution. However, the solution adds unnecessary things to
> the undo stack. Is there a cleaner way to do something similar?
[quoted text clipped - 6 lines]
>> Set myrange =
>> ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Range
abc - 31 Mar 2004 06:00 GMT
Thanks a lot. I was just being a bit choosy :-) Nevertheless, your code
works and mine wasn't working at all.
The reason I was not trying to change anything in the undo stack was that my
code would work on an user document and I would not want the user to see
unnecessary undo commands on the undo stack. Additionally, I would also not
like to clear his/her undo stack. Anyways, I will try working with this
limitation for some time.
Thanks a lot.
> I would not have thought that was such a great problem.
>
[quoted text clipped - 14 lines]
> >> Set myrange =
> >> ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Range