Editing the Ribbon on Office 2007

P

Pasha

Hello,
I've been trying to add some controls to the Office Ribbon for the users in
my onganization.
After some search in the web, I found this "tutorial":
http://msdn.microsoft.com/en-us/library/bb266217.aspx
which helped me quite a bit.
But still, there are few things i couldn't do:
1) How do i add my custom icon to the control?
the example uses "ImageMSO", but as i understand - it has fixed values and
depent on a different file (still looking for it).
the icon i want to add is an image which i created. how do i add it to the
Office? is there any way to use the "Resources" in Visual Studio to do it?

2) it would be much more efficient if i could add controls to an existing
tab in office, is there any way to do it?

3) how do i add Controls and tabs to Office Outlook 2007?
its toolbars are not the same as Word or Excel..
i want to add the controls to the Compose mail screen...

Thanks a lot,
Pavel.
 
K

Ken Slovak - [MVP - Outlook]

Use the getImage tag (or image) to supply an image for a control that
accepts an image. The best results are usually with PNG files that have
transparency in the alpha layer and are 32x32 pixels with 24-bit or 32-bit
color. You supply an IPictureDisp object as the return value of the
callback.

You can get the idMso of the tab you want from the documentation on the
ribbon for the application you're working with, the downloads on the ribbon
schemas are on the Office development Web site. You then use that idMso with
the <tab> tag to access that tab. You can then add your own UI as needed.
You can add your UI to your own group in that tab but you can't modify any
existing groups other than disabling built-in controls.

Outlook 2007 has the ribbon only for open items (Inspectors). Each Inspector
type calls for its own ribbon XML when the first item of that type is opened
in that Outlook session. In the GetCustomUI() callback you supply the XML
after testing for control.context, which will let you get at the type of
item. The types supplied are documented in that schemas download, for
compose items you'd be looking for a context of
"Microsoft.Outlook.Mail.Compose".
 
P

Pasha

Hey,
How do I use the getImage tag? do i need to write the full path of the
image, or just the name of the file if its in the "Resources" of the project?
I have made an .ico file, 32-bit. will it work?

I've tried to add a group to an existing tab with its ID, but didn't work

Do tou have any code or project examples to let me learn from it?
I can understand it much better when i see how the code works..

Thanks,
Pavel.
 
K

Ken Slovak - [MVP - Outlook]

As I said in my post, you supply an IPictureDisp object as the return value
for the getImage() callback. It can be in your resources file or in the file
system or on the Web or wherever.

I have some sample templates for Outlook 2007 at
http://www.slovaktech.com/outlook_2007_templates.htm. There are also sample
addins you can download from the Office developer Web site at MS.

You can supply an ICO file converted into an IPictureDisp object, but it
won't have transparency so it may not look very good.
 

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