Extend Default Ribbon

G

Guest

Hi,

I need the ids to add buttons to the Ribbon on the tab "Messages" (in german
"Nachrichten"). Can anybody give me a tip?

Thanks Christian
 
K

Ken Slovak - [MVP - Outlook]

Do you mean the "Message" tab? That's "TabNewMailMessage" for a new email
item and "TabReadMessage" for messages that are being read.

There's a download of all the XML tags for every type of Outlook ribbon and
for the ribbons for every other Office application at
http://www.microsoft.com/downloads/...80-f2c0-4b80-9ad1-2cb0c300aef9&displaylang=en

You can add your own Group to a tab such as Message, you can't add your own
ribbon controls to existing Groups within a tab. You create your ribbon UI
controls within the Group you add to the tab.
 
G

Guest

Hi Ken,

I try with the following Xml to add my group to the exisiting tab.

strDescription = "<customUI
xmlns=""http://schemas.microsoft.com/office/2006/01/customui""
loadImage=""LoadImage"">" & _
"<ribbon>" & _
"<tabs>" & _
"<tab id=""TabReadMessage"" label=""MyMessage"">" & _
"<group id=""c4bBrand"" label=""" & g_product & """>" & _
"<button id=""IDS_WaehlenCombo"" label=""" &
GetCheckedResString(IDS_WaehlenCombo) & """ onAction=""cmdCommonRibbonBttn""
getImage=""GetImage"" />" & _
"<button id=""IDS_Auflegen"" label=""" &
GetCheckedResString(IDS_Auflegen) & """ onAction=""cmdCommonRibbonBttn""
getImage=""GetImage"" />" & _
"<button id=""IDS_Aktionen"" label=""" &
GetCheckedResString(IDS_Aktionen) & """ onAction=""cmdCommonRibbonBttn""
getImage=""GetImage""/>" & _
"</group>" & _
"</tab>" & _
"</tabs>" & _
"<contextualTabs>" & _
"<tabSet idMso=""TabSetTableTools"" visible=""false""></tabSet>" & _
"</contextualTabs>" & _
"</ribbon>" & _
"</customUI>"

It creates a new group. Do you see my failure?

Thanks
Christian
 
K

Ken Slovak - [MVP - Outlook]

I doubt that the XML can use a procedure to create a fixed label, which is
what you are trying to do. I'd use getLabel instead and pass back the
formulated label text in that callback.

Also, if your onAction callbacks are calling the same procedures as the
click event handlers for buttons, as it appears, that's a problem. The click
handlers would require a CommandBarButton object passed to them. What I do
when I use code that shares the same functionality for buttons and ribbon
controls is have both call a procedure that doesn't rely on a
CommandBarButton object as a Click event would.
 
G

Guest

The COMAddIn works fine with the code. I only want to insert the group into
the tab "TabReadMessage". Outlook creates me a new tab. Do you have any idea
what I do wrong?
 
K

Ken Slovak - [MVP - Outlook]

You have to use this:

<tabs>
<tab idMso="TabReadMessage">
<group id ="c4bBrand" etc.

When you reference a built-in tab you have to use "idMso" and not "id". You
cannot add your own label to a built-in tab.
 
G

Guest

Hi Ken,

thanks a lot :)
Christian

Ken Slovak - said:
You have to use this:

<tabs>
<tab idMso="TabReadMessage">
<group id ="c4bBrand" etc.

When you reference a built-in tab you have to use "idMso" and not "id". You
cannot add your own label to a built-in tab.
 

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