Try to use the _DocumentSave() delegate in yr eventhandling object.
If coded properly, this should fire when you minimize the activedocument to bring up another ... This event will also fire when you change windows within the active MS Word session, as long as the scope of yr eventhandling object allows this.
It won't fire if you minimize MS Word, though ...
-- Krgrds, Perry
System: Vista/Office Ultimate VS2005/VSTO2005 SE
"G Craven" <gnc[ at ]googlemailNOSPAM.com> schreef in bericht news:57c49e56b35c4b8ea4395af54da1805c[ at ]ureader.com...
[Quoted Text] > Hello everyone. > I am using Word 2007 with a VS2005 VB addin which creates a Corporate Tab > on > the Word Ribbon. Several of the controls on this tab need to be disabled > when there are no documents open or they are minimised. Word starts with > no > documents open, and the controls in question run the getEnabled callback, > this all works fine. When the user opens a document from this tab, > InvalidateContol is used to refresh the controls in question and enables > them. > So far so good, but the next line is the problem. > When a user closes or minimses a document, I need the InvalidateControl to > run again. Help!! > > I am trying to put all of the code in the addin, not in an auto_macro in > Word, as this would require the normal.dotx and the addin to be bundled > together when updates are run. > > The question is, how can the addin be aware of what a document is doing? > > Thanks alot. Hopefully
|