Ribbon question

Status
Not open for further replies.
J

John Erickson

Hi,

I'm trying to repurpose some of the controls on the mail inspector ribbon.

Are the ribbon controls available in the Office::_CommandBars collection? If

so, under which control are they located? I've looked in the most obvious

one. The one called "Ribbon", but at the time the NewInspector event triggers

I only see one control listed under that collection. Are they added after the

NewInspector event? If so, when is the ideal time to look for them?

John
 
The ribbon controls are not in the CommandBars collection. You need to use

the XML schema for Outlook to know what XML to write for your ribbon

controls and to handle built-in controls in the ribbon. You then set up

callbacks for the things exposed by the schema and make all of your

customizations that way.

You can download the ribbon schemas from the Office developer Web site.

There are also samples there for how to use the ribbon.

"John Erickson" <JohnErickson> wrote in message

news:A9C6708A-C083-4033-B641-54041750E56C@microsoft.com...
> Hi,

> I'm trying to repurpose some of the controls on the mail inspector ribbon.
> Are the ribbon controls available in the Office::_CommandBars collection?
> If
> so, under which control are they located? I've looked in the most obvious
> one. The one called "Ribbon", but at the time the NewInspector event
> triggers
> I only see one control listed under that collection. Are they added after
> the
> NewInspector event? If so, when is the ideal time to look for them?

> John
 
Is there one document that I can download that describes all the idMso

commands in the Outlook ribbons or is there a utility like Spy for Ribbons?
wrote:


> The ribbon controls are not in the CommandBars collection. You need to use
> the XML schema for Outlook to know what XML to write for your ribbon
> controls and to handle built-in controls in the ribbon. You then set up
> callbacks for the things exposed by the schema and make all of your
> customizations that way.

> You can download the ribbon schemas from the Office developer Web site.
> There are also samples there for how to use the ribbon.

> >

>

> "John Erickson" <JohnErickson> wrote in message
> news:A9C6708A-C083-4033-B641-54041750E56C@microsoft.com...
> > Hi,
> > I'm trying to repurpose some of the controls on the mail inspector ribbon.
> > Are the ribbon controls available in the Office::_CommandBars collection?
> > If
> > so, under which control are they located? I've looked in the most obvious
> > one. The one called "Ribbon", but at the time the NewInspector event
> > triggers
> > I only see one control listed under that collection. Are they added after
> > the
> > NewInspector event? If so, when is the ideal time to look for them?
> > John


>
 
The ribbon schemas is a zip that has general docs on the overall ribbon

schema, then there are individual docs for each Office application's schemas

and individual ones for each Outlook item type. Everything isn't in just one

doc.

One way to get an idMso for a built-in ribbon control is to go to the

customize dialog for the QAT. In there if you hover over a control the idMso

will be displayed. I do that every so often in one-off situations, but I

find it more efficient when I'm composing a complete ribbon XML to work with

the separate docs.

"John Erickson" <JohnErickson> wrote in message

news:507D764E-9832-4007-8EBB-8403738C5266@microsoft.com...
> Is there one document that I can download that describes all the idMso
> commands in the Outlook ribbons or is there a utility like Spy for
> Ribbons?
 
Thanks Ken! I was able to use the hover technique to get the idMso values

that I need to repurpose. I think I am having issues with the xml format

though. I wish IRibbonExtensibility::GetCustomUI was designed differently so

that it was able to return an error code on poorly formatted xml and give me

some clues as to what's wrong. Since this is only my second attempt at

submitting xml for this call (Jenson Harris' example in using RibbonX with

C++ and ATL being my first), perhaps you can take a quick look at the xml I'm

providing and tell me what I'm doing wrong. The reason I think I'm having XML

issues is that I never see a call to my IDispatch::GetIDsOfNames when I click

the appropriate button. Here's the XML I'm returning:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"

<ribbon
<commands
<command idMso="JunkEmailAddToBlockedSendersList" onAction="OnABSL"
<command idMso="JunkEmailAddToSafeSendersList" onAction="OnASSL"
<command idMso="JunkEmailAddToSafeDomainList" onAction="OnASDL"
<command idMso="JunkEmailOptions" onAction="OnOptions"
<command idMso="JunkEmailMarkAsNotJunk" onAction="OnMarkAsNotJunk"
</commands
</ribbon
</customUI
John
wrote:


> The ribbon schemas is a zip that has general docs on the overall ribbon
> schema, then there are individual docs for each Office application's schemas
> and individual ones for each Outlook item type. Everything isn't in just one
> doc.

> One way to get an idMso for a built-in ribbon control is to go to the
> customize dialog for the QAT. In there if you hover over a control the idMso
> will be displayed. I do that every so often in one-off situations, but I
> find it more efficient when I'm composing a complete ribbon XML to work with
> the separate docs.

> >

>

> "John Erickson" <JohnErickson> wrote in message
> news:507D764E-9832-4007-8EBB-8403738C5266@microsoft.com...
> > Is there one document that I can download that describes all the idMso
> > commands in the Outlook ribbons or is there a utility like Spy for
> > Ribbons?


>
 
There is a setting in the Tools, Options advanced tab to show UI ribbon

errors that can sometimes be helpful, at least to localizing the error to

the XML line.

I'd have to get back to you on your repurposing XML, I only played with that

a little and it was a few years ago.

"John Erickson" <JohnErickson> wrote in message

news:F2B9BCE2-CDE9-4FFE-B81E-892FCE471160@microsoft.com...
> Thanks Ken! I was able to use the hover technique to get the idMso values
> that I need to repurpose. I think I am having issues with the xml format
> though. I wish IRibbonExtensibility::GetCustomUI was designed differently
> so
> that it was able to return an error code on poorly formatted xml and give
> me
> some clues as to what's wrong. Since this is only my second attempt at
> submitting xml for this call (Jenson Harris' example in using RibbonX with
> C++ and ATL being my first), perhaps you can take a quick look at the xml
> I'm
> providing and tell me what I'm doing wrong. The reason I think I'm having
> XML
> issues is that I never see a call to my IDispatch::GetIDsOfNames when I
> click
> the appropriate button. Here's the XML I'm returning:

> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
> <ribbon
> <commands
> <command idMso="JunkEmailAddToBlockedSendersList" onAction="OnABSL"
> <command idMso="JunkEmailAddToSafeSendersList" onAction="OnASSL"
> <command idMso="JunkEmailAddToSafeDomainList" onAction="OnASDL"
> <command idMso="JunkEmailOptions" onAction="OnOptions"
> <command idMso="JunkEmailMarkAsNotJunk" onAction="OnMarkAsNotJunk"
> </commands
> </ribbon
> </customUI
> John
 
Thanks again Ken. That allowed me to track down the problems. I had to

eliminate the ribbon tags and terminate the command tags with a \>. After

that it worked great.
wrote:


> There is a setting in the Tools, Options advanced tab to show UI ribbon
> errors that can sometimes be helpful, at least to localizing the error to
> the XML line.

> I'd have to get back to you on your repurposing XML, I only played with that
> a little and it was a few years ago.

> >

>

> "John Erickson" <JohnErickson> wrote in message
> news:F2B9BCE2-CDE9-4FFE-B81E-892FCE471160@microsoft.com...
> > Thanks Ken! I was able to use the hover technique to get the idMso values
> > that I need to repurpose. I think I am having issues with the xml format
> > though. I wish IRibbonExtensibility::GetCustomUI was designed differently
> > so
> > that it was able to return an error code on poorly formatted xml and give
> > me
> > some clues as to what's wrong. Since this is only my second attempt at
> > submitting xml for this call (Jenson Harris' example in using RibbonX with
> > C++ and ATL being my first), perhaps you can take a quick look at the xml
> > I'm
> > providing and tell me what I'm doing wrong. The reason I think I'm having
> > XML
> > issues is that I never see a call to my IDispatch::GetIDsOfNames when I
> > click
> > the appropriate button. Here's the XML I'm returning:
> > <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
> > <ribbon
> > <commands
> > <command idMso="JunkEmailAddToBlockedSendersList" onAction="OnABSL"
> > <command idMso="JunkEmailAddToSafeSendersList" onAction="OnASSL"
> > <command idMso="JunkEmailAddToSafeDomainList" onAction="OnASDL"
> > <command idMso="JunkEmailOptions" onAction="OnOptions"
> > <command idMso="JunkEmailMarkAsNotJunk" onAction="OnMarkAsNotJunk"
> > </commands
> > </ribbon
> > </customUI
> > John


>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
TomHuckstep Remove Send/Receive All Folders (IMAP/POP) button from Outlook 365 Ribbon Using Outlook 2
L Getting Index from dropdown inserted on ribbon Outlook VBA and Custom Forms 3
kburrows Outlook 365 - Ribbon Customizations Disappear Using Outlook 0
e_a_g_l_e_p_i Trying to customize the ribbon but can't figure this one out Using Outlook 3
Witzker Customized Ribbon lost every now and then Using Outlook 3
M Disable Contact Card Results when using "Search People" in Outlook Ribbon Using Outlook 7
Witzker Customized ribbon and entries disappeared Using Outlook 0
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
W Ribbon XML customization Using Outlook 4
M Simplified ribbon missing Using Outlook 3
L Outlook Office 365 client: won't remember my setting File, not to collapse ribbon Using Outlook 2
S How to set up button in ribbon for individual Quick Steps Using Outlook 1
A Possible to hide ribbon with custom appointment form? Outlook VBA and Custom Forms 3
I Retention policies on outlook 2016 ribbon Using Outlook 2
V not able to change name in customize Ribbon Outlook VBA and Custom Forms 1
Wayne Dardis Calling Ribbon Button in Outlook 2016 Outlook VBA and Custom Forms 6
W Adding A Macro To Message Ribbon Outlook VBA and Custom Forms 2
Diane Poremsky Customize the Outlook Toolbar, Ribbon or QAT Using Outlook 0
M No Show Group on ribbon Using Outlook 8
I Ribbon buttons grayed-out in Outlook 2013 Using Outlook 2
B How can I adjust the ribbon width? I want to see all of my Quick Steps. Using Outlook 1
piusg 2013: Place custom view on the ribbon Using Outlook 3
P Outlook 2007 Calendar Ribbon has changed and I can't fix it Using Outlook 10
R Can I create custom subgroups on the ribbon? Using Outlook 5
M missing iCloud tab on ribbon bar Using Outlook 0
G Adding 3rd-Party Add-In to Home Ribbon in Outlook 2010 Using Outlook 1
E Outlook Ribbon Customization and Deployment Using Outlook 1
C Outlook Calendar Ribbon with iCloud Using Outlook 2
S ADD-IN Ribbon Missing Using Outlook 2
S ADD-IN Ribbon Missing Using Outlook 5
S Outlook 2010 Ribbon - Creating Links To Websites or EXE Files Using Outlook 4
M Move 'Reply All' on Ribbon in Outlook 2010 Using Outlook 2
L Email button on ribbon defaulting to exchange when POP is default Using Outlook 7
K call a help file when click on a button xml ribbon Outlook VBA and Custom Forms 1
J Executing Ribbon Command from Code Outlook 2010 Outlook VBA and Custom Forms 3
T Word 2007 add-in ribbon icons greyed out Outlook VBA and Custom Forms 1
K add a designed group into a existing inspector ribbon Outlook VBA and Custom Forms 7
C Create a Ribbon for the OL2010 Explorer Outlook VBA and Custom Forms 1
T Ribbon Control questions Outlook VBA and Custom Forms 7
S What's the appointment ribbon called? Outlook VBA and Custom Forms 1
H Program "Click on Ribbon Button" Using VBA Outlook VBA and Custom Forms 1
M Can I embed ribbon item into form region? Outlook VBA and Custom Forms 2
R Build custom ribbon in Outlook 2007 Outlook VBA and Custom Forms 3
C Ribbon problem Outlook VBA and Custom Forms 3
R Could i do this with ribbon(outlook2007)? Outlook VBA and Custom Forms 1
M Stop ribbon item tool tip text from wrapping? Outlook VBA and Custom Forms 2
T Ribbon and a checkbox (C++ ATL) Outlook VBA and Custom Forms 8
H access appointmentItem from ribbon menu Outlook VBA and Custom Forms 1
D Application.ActiveInspector() is Null on Ribbon Load Outlook VBA and Custom Forms 1
T Using Ribbon in Inspector window Outlook VBA and Custom Forms 2

Similar threads

Back
Top