Ribbon positioning

M

Michael Tissington

Outlook has a lot of Ribbons ... Is it possible when creating a ribbon to
make it generic.

Is it possible to say modify the default tab and place my group after the
first group ?

Thanks.
 
W

Wei Lu [MSFT]

Hello Michael,

You could place your Ribbon Control in the default tab and after the first
group.

Please modify your Ribbon XML file like this:

customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabMessage">
<group insertBeforeMso="GroupActions" id="MyGroup1" label="My
Tools">
<button id="ROB_Button"
size="large"
image="ROB_Button.ico"
getLabel="GetItemLabel"
onAction="ExecuteItemOnAction"
getVisible="GetItemVisible"
getEnabled="GetItemEnabled" />
...
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Patrick Schmid [MVP]

You mean for all 19 ribbons at once? No, it is not. You will have to
provide the RibbonX via the GetCustomUI callback for each RibbonID that
you want to provide it for.
The RibbonX Wei provided does not work. TabMessage and GroupActions are
idMso's for the beta 2 build of Office 2007, not for the release build.
It would work for the Outlook.Mail.Read ribbon if you used
TabReadMessage and GroupShow instead. However for the
Outlook.Mail.Compose ribbon, you'd have to use TabNewMailMessage and
GroupSend.
I suggest you build your RibbonX as a string whenever GetCustomUI is
called and use the appropriate idMso's for the tabs and groups on that
particular ribbon then.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
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
 
M

Michael Tissington

Hello Wei,

Thanks but this does not answer my question ... this example is Outlook Item
specific - using TabMessage ... for example an Outlook Contact has the first
tab called TabContact so I would need a new XML for each type of Outlook
Item.

I'm hoping I can say something like tab="FirstTab"
 
M

Michael Tissington

Thanks.

Patrick Schmid said:
You mean for all 19 ribbons at once? No, it is not. You will have to
provide the RibbonX via the GetCustomUI callback for each RibbonID that
you want to provide it for.
The RibbonX Wei provided does not work. TabMessage and GroupActions are
idMso's for the beta 2 build of Office 2007, not for the release build. It
would work for the Outlook.Mail.Read ribbon if you used TabReadMessage and
GroupShow instead. However for the Outlook.Mail.Compose ribbon, you'd have
to use TabNewMailMessage and GroupSend.
I suggest you build your RibbonX as a string whenever GetCustomUI is
called and use the appropriate idMso's for the tabs and groups on that
particular ribbon then.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
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

Outlook has a lot of Ribbons ... Is it possible when creating a ribbon to
make it generic.

Is it possible to say modify the default tab and place my group after the
first group ?

Thanks.
 
P

Patrick Schmid [MVP]

No, definitely no way to do that. But if you build your XML as string,
you can insert the correct tab/group name with a simple if statement.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
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
 

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