cancelling out of an "ActiveDocument.Save"

  • Thread starter Thread starter kill_beast
  • Start date Start date
K

kill_beast

I have a line of code: ActiveDocument.Save in my Document_Close() sub in a
template.

It asks for a filename, but if the user cancels instead of saving, it gives
an error saying that the procedure failed.

Is there a way to clean this up?
 
kill_beast said:
I have a line of code: ActiveDocument.Save in my Document_Close() sub
in a template.

It asks for a filename, but if the user cancels instead of saving, it
gives an error saying that the procedure failed.

Is there a way to clean this up?

Before the ActiveDocument.Save, insert the statement

On Error Resume Next


--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
That did it.

Thank you very much.

Jay Freedman said:
Before the ActiveDocument.Save, insert the statement

On Error Resume Next


--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top