D
DTekW108
Background
I have created an application level Word Add-in for Word 2007 using Visual
Studio 2008 and VSTO. I first created it just using the Visual Designer in
Visual Studio 2008. Just drag & drop controls onto the ribbon and set their
properties. In this initial approach, I had full dynamic control over all
the ribbon control properties e.g. enable/disable of buttons and checkboxes
based on what a user was clicking on. This approach is really just a bunch
of event handlers. The problem was that it put all the controls in the
built-in "Add-Ins" tab. So I changed to the embedded XML resource file
approach so I have an XML file that now creates the same UI but in a separate
tab. The initial UI that loads is fine. But this new approach apparently
uses a callback mechanism.
The problem
How do I get dynamic access to the Ribbon controls? I want to be able to
programmatically enable/disable Ribbon controls at runtime based on what
control the user has clicked .... as I did in my first approach. I also want
to be able to "tick" a checkbox control or "untick" it based on what the user
has done. This seems like a fairly basic thing to want to do in a UI. What
am I missing here? Can this be done?
If anyone could point me in the right direction, I'd be most grateful!
Thanks in advance!
I have created an application level Word Add-in for Word 2007 using Visual
Studio 2008 and VSTO. I first created it just using the Visual Designer in
Visual Studio 2008. Just drag & drop controls onto the ribbon and set their
properties. In this initial approach, I had full dynamic control over all
the ribbon control properties e.g. enable/disable of buttons and checkboxes
based on what a user was clicking on. This approach is really just a bunch
of event handlers. The problem was that it put all the controls in the
built-in "Add-Ins" tab. So I changed to the embedded XML resource file
approach so I have an XML file that now creates the same UI but in a separate
tab. The initial UI that loads is fine. But this new approach apparently
uses a callback mechanism.
The problem
How do I get dynamic access to the Ribbon controls? I want to be able to
programmatically enable/disable Ribbon controls at runtime based on what
control the user has clicked .... as I did in my first approach. I also want
to be able to "tick" a checkbox control or "untick" it based on what the user
has done. This seems like a fairly basic thing to want to do in a UI. What
am I missing here? Can this be done?
If anyone could point me in the right direction, I'd be most grateful!
Thanks in advance!