You have a lot of ancient WordBasic code there, which suggests it was written before Word 97 was released, some two decades ago! The whole lot should be re-written in VBA.
As for what your code is doing, it appears to be clearing content from the page headers. If you're clearing the entire content, that can be done with a lot less fuss than your current approach and, as for the undo processing, if you save the document before printing you could simply reload the saved copy afterwards without all the Undo issues.
Accordingly, it would be helpful if you could clarify what you're going.
PS: When posting code, please use the code tags, indicated by the # button on the posting menu. Without them, your code loses much of whatever structure it had.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|