J
John Hamilton
Applies to Excel, Word, and PPT
Simple scenario: When no document is open, I disable my CommandBarButtons in
my CommandBarPopup's Controls collection.
foreach( CommandBarButton btn in mMenu.Controls ){ btn.Enabled = false; }
When I create a new document or open an existing document, I want to renable
my CommandBarButtons. I do so by getting the reference to each button and
setting Enabled = true;
btnLinkPic = (CommandBarButton)mMenu.Controls[ LINK_PICTURE_BUTTON ];
btnLinkPic.Enabled = true;
The Click event for each button is wired upon the add-in connect, and never
twice.
The problem: After closing a document, and opening/creating a document, the
Click event of the button fires twice.
Any suggestions?
Best regards,
John Hamilton
net Fusion Corp.
Simple scenario: When no document is open, I disable my CommandBarButtons in
my CommandBarPopup's Controls collection.
foreach( CommandBarButton btn in mMenu.Controls ){ btn.Enabled = false; }
When I create a new document or open an existing document, I want to renable
my CommandBarButtons. I do so by getting the reference to each button and
setting Enabled = true;
btnLinkPic = (CommandBarButton)mMenu.Controls[ LINK_PICTURE_BUTTON ];
btnLinkPic.Enabled = true;
The Click event for each button is wired upon the add-in connect, and never
twice.
The problem: After closing a document, and opening/creating a document, the
Click event of the button fires twice.
Any suggestions?
Best regards,
John Hamilton
net Fusion Corp.