custom ribbon not appearing in outlook when when running a build in vs
Asked Answered
H

8

24

I followed this tutorial, but when I build then run my project in visual studio a ribbon tab does not appear. I'm using outlook 2010 if that helps.

Holliholliday answered 17/9, 2012 at 21:57 Comment(5)
What Ribbon type (XML or Designer) are you creating? The link you provided is a tutorial on Custom Task Pane integration with Ribbon. You should refer to Ribbon Overview for a Ribbon walkthrough first.Fabric
I'm using the ribbon designer. The tutorial still walks you through the ribbon creating process though, in the same way the ribbon walk through does, I believe. Is there any code you have to add the the thisaddin classin order for it to show up?Holliholliday
Did any error messages come out when you building the project? Or it simply just didnt appear?Titanomachy
You need to provide more details on what code you have tried etc. in order to receive useful help.Cyclohexane
Possible duplicate #9301026Knotts
H
83

Turns out you need to set the ribbontype property to Microsoft.Outlook.Explorer for it to show up. This is not the default value for that field, and no msdn tutorial seems to tell you to make that change.

Holliholliday answered 28/9, 2012 at 0:50 Comment(3)
Ou meen ... some where it makes sense, but i think a litttle helping hint at the tutorial won't let them feel too much pain, i think badumtsBerk
This advice doesn't work for me because there is no Microsoft.Outlook.Explorer item in that list with checkboxes (where there is Microsoft.Outlook.Mail.Read item checked by default). Using Outlook 2010, VS 2008 SP1, Office 2007 template.Catlin
Well, it can actually be worked around by manual editing of SyncRibbon.Designer.cs (this.RibbonType = "Microsoft.Outlook.Explorer";) in InitializeComponent method but this seems to be a dirty hack as this method is not intended for manual editing.Catlin
H
6

http://msdn.microsoft.com/en-us/library/bb398246.aspx

I used this link on MSDN to fix the error. Simply says that you need to set the RibbonType property for which occurrences you want the ribbon visible/usable.

Hick answered 6/10, 2014 at 18:12 Comment(0)
M
4

This can also happen if your code previously used the Ribbon XML mechanism before switching to the Ribbon Designer mechanism, and you have inadvertently left a CreateRibbonExtensibilityObject override in place:

protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
  return new MyRibbon(); 
}

Once you remove this override, your Ribbon Designer customizations will load as expected.

Myrmeco answered 23/10, 2016 at 21:28 Comment(4)
Brilliant! Thanks, this was my issue.Blackguard
Thanks, this solved one problem, but raised another: my custom context menu (right mouse click dropdown) doesn't work anymore. Any ideas?Highway
@RobvanMeeuwen then perhaps your custom menu is defined in the old Ribbon.XML and needs moving over to your Ribbon Designer code?Myrmeco
Thx for replying @RegEdit, but I found the way how to cope with this. I just added xml code for a custom tab inside the MyRibbon.xml. I got rid of the designer version and now all went well.Highway
C
4

enter image description here

On the right hand side you will see properties..

enter image description here

Select the ribbon types you intend to use.

Chalaza answered 27/6, 2022 at 15:14 Comment(1)
Thanks a lot @Eduards. Used this several times over years but forgot clicking on the right region to get this setting in ribbon designer. Your answer helped a lot.Lumbar
T
3

Old post but it didn't give me an answer. In my case the add In was simply not showing anymore after some development time for no explicit reason.

The solution was to re-enable the AddIn in Excel. It probably happened one of the time Excel was asking me "Excel is having trouble with this AddIn, disable it ?" that appeared sometimes when deploying (F5).

To reenable it go to Excel -> File -> options -> AddIns

Tinsmith answered 8/3, 2016 at 23:2 Comment(0)
T
3

You have to select the correct ribbontype property, if you are mapping your ribbon to new mail compose tab then you have to select Microsoft.Outlook.Explorer.Compose, if you are mapping to reading mail then you have to select Microsoft.Outlook.Explorer.Read and so on.

Tse answered 11/10, 2018 at 10:38 Comment(0)
B
1

If previously you run the solution resulting in an error, an office application may still run hidden and prevent showing the Add-In. Stop VisualStudio, check taskmanager for orphan Office processes, kill these.

Blaeberry answered 17/3, 2017 at 16:6 Comment(1)
I suspect this was the issue in my case. Since I ran many Office programs besides Excel, it worked for me to reboot my machine.Peevish
B
0

Also, any error in the XML structure results in it not being able to load. My culprit? using idMso vs id for my custom tab.

Word VSTO.

Byyourleave answered 2/7 at 21:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.