I am facing something strange in my Visio Add-in:
I have a CommandBar, with CommandButtons on it and I just launch my debug mode.
The first page is OK (the start page of Visio) but if I open a file or create a new file, I can click all I want on my buttons, nothing is working !
It worked perfectly on the start page but not on my new visio file…
I tried to comment parts of my code, but the issue seems to come from nowhere… I really do not understand.
If someone already faced this kind of behaviour, please help, I just do not know what to do…
You could try setting “.Tag” property for your button to some unique value.
More info here:
http://msdn.microsoft.com/en-us/library/aa201791.aspx,
“Maintaining references to command bar controls when contexts change”