views:

22

answers:

1

I'm developing an Office 2007 add-in. I would like to have a piece of code execute whenever the user Saves a document. I'm principally interested in Word, Excel and PowerPoint, but I'd prefer to also support other Office apps (such as Visio and Microsoft Project).

Looking for either a code sample, or a link to an article that describes the basic steps to perform. Thanks in advance!

+1  A: 

Getting closer. Apparently what I want is the DocumentBeforeSave event

jimbojw
... which can be [handled in C#][2]2: http://social.msdn.microsoft.com/forums/en-US/vsto/thread/088da6c4-cbef-4920-abbb-1c0424da9285/
jimbojw
this page explains how to hook DocumentBeforeSave for Word 2007: http://msdn.microsoft.com/en-us/library/cc442946.aspx
jimbojw