A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Ribbon question



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 22nd 09, 11:13 AM posted to microsoft.public.outlook.program_addins
John Erickson[_2_]
external usenet poster
 
Posts: 27
Default Ribbon question

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
  #2  
Old August 24th 09, 02:13 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Ribbon question

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"John Erickson" wrote in message
...
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


  #3  
Old August 28th 09, 02:19 AM posted to microsoft.public.outlook.program_addins
John Erickson[_2_]
external usenet poster
 
Posts: 27
Default Ribbon question

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?

"Ken Slovak - [MVP - Outlook]" 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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"John Erickson" wrote in message
...
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



  #4  
Old August 28th 09, 02:25 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Ribbon question

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"John Erickson" wrote in message
...
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?


  #5  
Old August 28th 09, 07:43 PM posted to microsoft.public.outlook.program_addins
John Erickson[_2_]
external usenet poster
 
Posts: 27
Default Ribbon question

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

"Ken Slovak - [MVP - Outlook]" 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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"John Erickson" wrote in message
...
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?



  #6  
Old August 28th 09, 10:21 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Ribbon question

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"John Erickson" wrote in message
...
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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Could i do this with ribbon(outlook2007)? ryotyankou via OfficeKB.com Add-ins for Outlook 1 August 17th 09 02:45 PM
Ribbon and a checkbox (C++ ATL) Tom[_4_] Add-ins for Outlook 8 July 30th 09 11:18 PM
Ribbon Error Christian Havel Add-ins for Outlook 1 January 14th 09 03:32 PM
How do I restore the ribbon? Casimir Outlook - Installation 0 April 30th 07 11:32 PM
Outlook 2007 - why no ribbon? Daern's Instant Fortress Outlook - General Queries 1 May 24th 06 05:56 PM


All times are GMT +1. The time now is 12:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.