Re: Stopping AutoClose macro

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



In place of AutoClose, you want the DocumentBeforeClose event. That has a
Cancel argument which, if set TRUE, prevents the document closing.

Read Help on 'Trapping Word events' for how to set it up.




"Stephen English" <StephenEnglish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:65CEE508-F731-40AB-AD7D-DDEEEFF44C24@xxxxxxxxxxxxxxxx
I have put code in the AutoClose macro to check if a bookmark exists. If
it
doesn't I throw up an error messagebox. However, when they OK the
message
box, I want to cancel the autoclose so the document stays open. Exit Sub
doesn't work.

Any ideas please?
Stephen


.