How to develop contextualTabs

S

Steven

Dear,

I develop a ribbon in powerpoint2007, I want to select a shape, then it
will display a contextual tabs, I already config contextual xml in my
ribbon.xml file, But I want to know how to display this contextual tabs when
I select a shape? I know there is a WindowSelectionChang event when select a
shape object, Anyone give me a idea, Thanks!
 
P

Patrick Schmid [MVP]

When you select a shape in PPT 2007, the contextual tab labeled Drawing
Tools - Format will appear at the right side of the ribbon. Depending on
what the user was doing prior to selecting a shape, PPT will either just
show that contextual tab or make it the current tab as well.
Are you saying that you wrote a contextual tab that is part of the
Drawing Tools? Or what exactly did you write? Pasting your RibbonX here
would help.
By the way: there really is no need to cross-post this question
massively. Microsoft.public.office.developer.com.add_ins would have been
sufficient.

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
 
S

Steven

Thanks for answer!

My ribbon xml is

<contextualTabs>
<tabSet idMso="TabSetChartTools" getVisible="test_GetVisible" >
<tab label="Testc" id="testc" >
<group id="gpSysc" label="test">
<splitButton id="sbConfigc" size="large">
<button id="btntest
keytip="PS"
onAction="OnBtnTest_Click"
getLabel="Test label"
image="test.gif"
screentip="test label "
supertip="test label"
/>
</group>
</tab>
</tabSet>
</contextualTabs >

I want to set <tabSet idMso="TabSetChartTools" getVisible="test_GetVisible"
to <tabSet id="Mytest" getVisible="test_GetVisible" >, But it will
display error meessage!
I want to select a shape, then it will display this contextualTabs, I think
I need use WindowSelectionChang event check whether it is my shape name,
then it will display this contextualTabs, But I don't know how to display
this contextualTabs with programe? Thanks

--
Best Regards
Steven

Patrick Schmid said:
When you select a shape in PPT 2007, the contextual tab labeled Drawing
Tools - Format will appear at the right side of the ribbon. Depending on
what the user was doing prior to selecting a shape, PPT will either just
show that contextual tab or make it the current tab as well.
Are you saying that you wrote a contextual tab that is part of the Drawing
Tools? Or what exactly did you write? Pasting your RibbonX here would
help.
By the way: there really is no need to cross-post this question massively.
Microsoft.public.office.developer.com.add_ins would have been sufficient.

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
 
P

Patrick Schmid [MVP]

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]
--------------
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!

My ribbon xml is

<contextualTabs>
<tabSet idMso="TabSetChartTools" getVisible="test_GetVisible" >
<tab label="Testc" id="testc" >
<group id="gpSysc" label="test">
<splitButton id="sbConfigc" size="large">
<button id="btntest
keytip="PS"
onAction="OnBtnTest_Click"
getLabel="Test label"
image="test.gif"
screentip="test label "
supertip="test label"
/>
</group>
</tab>
</tabSet>
</contextualTabs >

I want to set <tabSet idMso="TabSetChartTools" getVisible="test_GetVisible"
to <tabSet id="Mytest" getVisible="test_GetVisible" >, But it will
display error meessage!
I want to select a shape, then it will display this contextualTabs, I think
I need use WindowSelectionChang event check whether it is my shape name,
then it will display this contextualTabs, But I don't know how to display
this contextualTabs with programe? Thanks

--
Best Regards
Steven

Patrick Schmid said:
When you select a shape in PPT 2007, the contextual tab labeled Drawing
Tools - Format will appear at the right side of the ribbon. Depending on
what the user was doing prior to selecting a shape, PPT will either just
show that contextual tab or make it the current tab as well.
Are you saying that you wrote a contextual tab that is part of the Drawing
Tools? Or what exactly did you write? Pasting your RibbonX here would
help.
By the way: there really is no need to cross-post this question massively.
Microsoft.public.office.developer.com.add_ins would have been sufficient.

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

Dear,

I develop a ribbon in powerpoint2007, I want to select a shape, then it
will display a contextual tabs, I already config contextual xml in my
ribbon.xml file, But I want to know how to display this contextual tabs
when
I select a shape? I know there is a WindowSelectionChang event when
select a
shape object, Anyone give me a idea, Thanks!
 
S

Steven

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 said:
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]
--------------
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!

My ribbon xml is

<contextualTabs>
<tabSet idMso="TabSetChartTools" getVisible="test_GetVisible" >
<tab label="Testc" id="testc" >
<group id="gpSysc" label="test">
<splitButton id="sbConfigc" size="large">
<button id="btntest
keytip="PS"
onAction="OnBtnTest_Click"
getLabel="Test label"
image="test.gif"
screentip="test label "
supertip="test label"
/>
</group>
</tab>
</tabSet>
</contextualTabs >

I want to set <tabSet idMso="TabSetChartTools"
getVisible="test_GetVisible"
display error meessage!
I want to select a shape, then it will display this contextualTabs, I
think
I need use WindowSelectionChang event check whether it is my shape name,
then it will display this contextualTabs, But I don't know how to display
this contextualTabs with programe? Thanks
 
P

Patrick Schmid [MVP]

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 said:
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]
--------------
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!

My ribbon xml is

<contextualTabs>
<tabSet idMso="TabSetChartTools" getVisible="test_GetVisible" >
<tab label="Testc" id="testc" >
<group id="gpSysc" label="test">
<splitButton id="sbConfigc" size="large">
<button id="btntest
keytip="PS"
onAction="OnBtnTest_Click"
getLabel="Test label"
image="test.gif"
screentip="test label "
supertip="test label"
/>
</group>
</tab>
</tabSet>
</contextualTabs >

I want to set <tabSet idMso="TabSetChartTools"
getVisible="test_GetVisible"
to <tabSet id="Mytest" getVisible="test_GetVisible" >, But it will
display error meessage!
I want to select a shape, then it will display this contextualTabs, I
think
I need use WindowSelectionChang event check whether it is my shape name,
then it will display this contextualTabs, But I don't know how to display
this contextualTabs with programe? Thanks
 
S

Steven

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 said:
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 said:
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]
 
P

Patrick Schmid [MVP]

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 said:
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]
 
S

Steven

Thanks!
How do I know the exist tabset idMSO name? I set my tabset is visible, But
I don't see it after I run my application in powerpoint and sent key!

--
Best Regards
Steven

Patrick Schmid said:
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 said:
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]
 
P

Patrick Schmid [MVP]

Let me see your RibbonX again...

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!
How do I know the exist tabset idMSO name? I set my tabset is visible, But
I don't see it after I run my application in powerpoint and sent key!

--
Best Regards
Steven

Patrick Schmid said:
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]
 
S

Steven

My Ribbon is
<contextualTabs>
<tabSet idMso="TabSetChartTools" visible ="true" >
<tab label="Testc" id="testc" visible ="true">
<group id="gpSysc" label="test">
<splitButton id="sbConfigc" size="large">
<button id="btntest
keytip="PS"
onAction="OnBtnTest_Click"
getLabel="Test label"
image="test.gif"
screentip="test label "
supertip="test label"
/>
</group>
</tab>
</tabSet>
</contextualTabs >

But I can't see my tab "Testc" in powerpoint!


--
Best Regards
Steven

Patrick Schmid said:
Let me see your RibbonX again...

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!
How do I know the exist tabset idMSO name? I set my tabset is visible,
But
I don't see it after I run my application in powerpoint and sent key!

--
Best Regards
Steven

Patrick Schmid said:
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]
 

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