First, you need to make it visible by using the
InvalidateControl(tabid)
method of the IRibbonUI object returned to you by onLoad and the
getVisible callback of the tab.
Use SendKeys to send the keyTip that your tab has. Keep in mind though
that the KeyTip of your tab is not guaranteed because a particular key
sequence might be taken in one particular language already, or another
add-in uses the same key sequence already. I would advise to just make
the
tab visible and not switch to it.
Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Outlook 2007 Performance Update:
http://pschmid.net/blog/2007/04/13/105
Office 2007 RTM Issues:
http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007:
http://pschmid.net/office2007/customize
RibbonCustomizer Add-In:
http://pschmid.net/office2007/ribboncustomizer
OneNote 2007:
http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog:
http://pschmid.net/blog/feed
Thanks for your answer!
Can u tell me how to invoke it when my object is selected, I know we
use
powerpoint windows selected change event find my object, How to
invoke
this
core tab when select this ojbect? Can u give me some idea? Thanks very
much!
--
Best Regards
Steven
"Patrick Schmid [MVP]" <
[email protected]> ????
You cannot make your own contextualTabs. You can only use an
existing
one.
You can simulate a contextualTab by creating a core tab with a
getVisible
property. Hide it when your object is not selected, and show it when
it
is.
Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Outlook 2007 Performance Update:
http://pschmid.net/blog/2007/04/13/105
Office 2007 RTM Issues:
http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007:
http://pschmid.net/office2007/customize
RibbonCustomizer Add-In:
http://pschmid.net/office2007/ribboncustomizer
OneNote 2007:
http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog:
http://pschmid.net/blog/feed
Thanks for answer!
If I want to write myself contextualTabs, How do I do? If my shape
is
other
activex object, I want to select this object, then display a
contextual
tabs, I can set some properties for this ojbect, How to display
myself
contextualTabs? Can u give me a guideline?
Thanks
--
Best Regards
Steven
"Patrick Schmid [MVP]" <
[email protected]> ????
You can't. You cannot create your own tabSet. You can only use
the
ones
Microsoft provides. Checking the event won't do you any good
either,
because there is nothing in the object model that would allow you
to
change a tab (a half-working, but not recommendable hack is to
send
the
KeyTip that activates a tab to switch to it. You'd then make your
tab a
core tab, and hide it until it's needed. But that approach is
extremely
problematic.)
So you'd have to extend an existing tabSet. If you want to do it
for
chart
tools (for a shape, you'd want to use Drawing Tools though),
you'd
have
to
use the RibbonX you gave me. I'd suggest though to use
insertBeforeMso
in
your tab to make it the first tab in the tabSet. Also, the
getVisible
callback in the tabSet won't be of any help to you either, except
of
course if you never want the user to create a chart via Office.
What kind of shapes are you creating?
Patrick Schmid [OneNote MVP]