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
Perry - 09 Apr 2007 22:38 GMT
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
> Hello everyone.
> I am using Word 2007 with a VS2005 VB addin which creates a Corporate Tab
[quoted text clipped - 17 lines]
>
> Thanks alot. Hopefully
Perry - 09 Apr 2007 23:02 GMT
> _DocumentSave()
change that into
_DocumentChange() event
Sorry for inconven
--
Krgrds,
Perry
System:
Vista/Office Ultimate
VS2005/VSTO2005 SE
> Try to use the _DocumentSave() delegate in yr eventhandling object.
>
[quoted text clipped - 36 lines]
>>
>> Thanks alot. Hopefully