Save / SaveAs events

D

dudelaw2

In a MSFT Word application level Add-in, how can I 'tie into' document save
events?

I see an Application.DocumentBeforeSave event, but no "DocumentAfterSave"
events...

How can I determine what each document's current file location is?

Folks want me to save the word document as a blob in a SQL DB table; but I'm
unsure how to tie into Word save events...

Suggestions?
 
D

Doug Robbins - Word MVP

If you create a macro with the same name as one of the Word commands, your
macro will run in place of those commands. In your case, you need to have
macros named

FileSave
FileSaveAs

and maybe

FileSaveAll

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

dudelaw2

What happens in the case where multiple add-ins are installed that might need
to tie into the Save / Save as methods?
 
D

Doug Robbins - Word MVP

I don't know. Try it with macros in the addins that just do something like
display a MsgBox and see if there is a pattern to the which macro gets
executed. You may be able to make use of the
ActiveDocument.AttachedTemplate to control what happens.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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