Controling the Ribbon

  • Thread starter Peter Karlström
  • Start date
P

Peter Karlström

Hi

I'm trying to replace the funtionality from an old Word 2003 commandbar to
the new Ribbon-technology in Word 2007 in a large VB6 COM Addin project.
I have figured out how to create the Ribbon Tab with XML (Thank you Ken
Slovak) and get it to call procedures in the COM Addin like the old inteface,
but one thing I can't figure out:

When the user switch between documents (thru oApp_WindowActivate event),
some of the functions in the Ribbon must be disabled, depending of the type
of document.
The type of document is project related to the customers document handling
system, and the disabling and enabling of functions in the Ribbon tab is
essential to this applications interface.

How can this be done?

Thanks in advance
 
K

Ken Slovak - [MVP - Outlook]

When the WindowActivate() event fires you can use the window passed to you
(wn) to get the document in the window and then call Invalidate() or
InvalidateControl(idMSO) to force your ribbon callbacks to be called. There
you can set the visible and enabled properties of the items as well as
switch ribbon icons and labels, etc.
 
P

Peter Karlström

Hi Ken

Thank you for your reply.

I will have a look into that, togehter with the information from mwiles reply.

Best Regards
--
Peter Karlström
Midrange AB
Sweden


Ken Slovak - said:
When the WindowActivate() event fires you can use the window passed to you
(wn) to get the document in the window and then call Invalidate() or
InvalidateControl(idMSO) to force your ribbon callbacks to be called. There
you can set the visible and enabled properties of the items as well as
switch ribbon icons and labels, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top