Catch EndSave Event?

K

Kelie

Hello,

Is there a way to catch the EndSave/AfterSave enent for a document? I
looked through the reference and only found the DocumentBeforeSave
event for the Application object. There is no DocumentAfterSave or
DocumentEndSave event.

Thank you!
 
J

Julian

Not unless you register a call to a suitable DLL... and I have no idea what
or where to find it - I would be interested myself to know how to trap more
events...

However, as a work around [I can think of more convoluted ways but this
seems easiest] you could use the OnTime* feature to run a macro with a delay
and test the document.SAVED property; either the OnTime run will be delayed
(a parameter setting) until the save operation is completed, or OnTime will
run (and should therefore re-schedule itself - with appropriate get out
clause, such as a simple DoEvents - every few seconds)

Either way, the macro can detect the change from Saved = False to Saved =
True...

HTH

*Word 2002 (?others?) - unlike Excel - only supports one OnTime at a time...
so if you are already using it, you will need to think carefully about the
structure...
 
J

Julian

Oh... now I read the message I see I was only answering the title...

--
Julian I-Do-Stuff

Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
Julian said:
Not unless you register a call to a suitable DLL... and I have no idea
what or where to find it - I would be interested myself to know how to
trap more events...

However, as a work around [I can think of more convoluted ways but this
seems easiest] you could use the OnTime* feature to run a macro with a
delay and test the document.SAVED property; either the OnTime run will be
delayed (a parameter setting) until the save operation is completed, or
OnTime will run (and should therefore re-schedule itself - with
appropriate get out clause, such as a simple DoEvents - every few seconds)

Either way, the macro can detect the change from Saved = False to Saved =
True...

HTH

*Word 2002 (?others?) - unlike Excel - only supports one OnTime at a
time... so if you are already using it, you will need to think carefully
about the structure...

--
Julian I-Do-Stuff

Some Vista stuff, but mostly just Stuff at http://berossus,blogspot.com
Kelie said:
Hello,

Is there a way to catch the EndSave/AfterSave enent for a document? I
looked through the reference and only found the DocumentBeforeSave
event for the Application object. There is no DocumentAfterSave or
DocumentEndSave event.

Thank you!
 
T

Tony Jollans

There is no AfterSave event. What you do is trap the BeforeSave event, do
the save in the code yourself, do whatever you want to do after the save,
and then cancel Word's save.
 

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

Top