VSTO2010 AddIn Ribbons not showing in Outlook RRS feed

  • Question

  • I have tried to create a simple Hello World ribbon example for Outlook 2010 using VS2010. I have done it before, but I just wanted a quick refresher. FYI, this did work a few months ago on the same machine (my dev machine). However now, non of the ribbons ever show up, no matter what settings I use on the ribbon designer. 

    I have read through many other peoples entries about ribbons not displaying and I have tried to make sure that I am not having the same problem. So I ensured that:

    • RibbonType set to Microsoft.Outlook.Explorer
    • TabIdType set to Custom
    • Tab ControlId set to MyFirstTab
    • Tab Name set to MyFirstTab

    I have also added a ribbon load event to trap when the ribbon is loaded, and of course, it never loads.

    I then tried:

    • Export to XML and apply the addin override CreateRibbonExtensibilityObject

    In this case, the ribbon load event fires but the custom ribbon still does not show.

    I have also checked:

    • addin is not disabled; addin is loaded
    • "Show add-in user interface errors" is switched on, but no errors ever shown

    Even creating a new project from scratch does not help.

    However, I do have Visual Studio 2012 installed, so I thought I would just give it a try... Using exactly the same settings as what I used in the VS2010 project, the ribbon tab showed in Outlook correctly.

    Does anyone know the finer details of how the ribbon is loaded and shown so that I can resolve the issue in my VS2010 project?


    Thursday, December 13, 2012 4:10 PM


  • i think - but i;m not sure 100% - that vs2012 installs vstor 2010 SP1 - maybe you should install this SP1 on machine with vs2010 also?

    you can also share with us content of your ribbon xml and whole addin and ribbon classes. (just remove unnecessary stuff)

    Friday, December 14, 2012 7:44 AM

All replies

  • Hi dayneo_,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that first thing you need to confirm is whether your add-in has been loaded. As usual, this is a frequently option when your ribbon disappear.

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 14, 2012 2:29 AM
  • Hi Tom,

    I did check that, and it definitely is enabled. This is how I confirmed that my add-in was definitely loaded:

    1. I first added a MsgBox statement to the add-in's startup event. And that displayed correctly.
    2. Once Outlook was fully open, I checked that my add-in was in fact enabled by viewing it the Outlook Options dialog and ensuring that it was in fact listed under Active Application Add-ins.
    3. I have an Application.ItemLoad event handler with a trace statement in it. I am receiving the trace statements to the VS2010 immediate window whenever I open any item in Outlook.

    This information tells me that the add-in is definitely, 100% loaded.

    But, still no ribbon. At least, not when developed in VS2010. Create the same code in VS2012 and ribbon shows up straight away (for the VS2012 add-in). 

    I have a suspicion that something to do with the installation of VS2012 has affected the ribbon loading for VS2010 projects.


    Friday, December 14, 2012 6:21 AM
  • i think - but i;m not sure 100% - that vs2012 installs vstor 2010 SP1 - maybe you should install this SP1 on machine with vs2010 also?

    you can also share with us content of your ribbon xml and whole addin and ribbon classes. (just remove unnecessary stuff)

    Friday, December 14, 2012 7:44 AM
  • Hi DamianD,

    "i think - but i;m not sure 100% - that vs2012 installs vstor 2010 SP1 - maybe you should install this SP1 on machine with vs2010 also?"

    I am not sure how I would actually test that without re-installing my whole dev env.

    However, my installed VS2010 version is: 10.0.40219.1 SP1Rel

    VS2012 version is : 11.0.50727.1 RTMREL

    As for the ribbon code, I used the Ribbon designer to create the example. Here is the designer generated code (again, this code is enough to show the ribbon when run from VS2012, but will not show when run from VS2010):

    Partial Class MyRibbonExample
        Inherits Microsoft.Office.Tools.Ribbon.RibbonBase
        <System.Diagnostics.DebuggerNonUserCode()> _
       Public Sub New(ByVal container As System.ComponentModel.IContainer)
            'Required for Windows.Forms Class Composition Designer support
            If (container IsNot Nothing) Then
            End If
        End Sub
        <System.Diagnostics.DebuggerNonUserCode()> _
        Public Sub New()
            'This call is required by the Component Designer.
        End Sub
        'Component overrides dispose to clean up the component list.
        <System.Diagnostics.DebuggerNonUserCode()> _
        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
                If disposing AndAlso components IsNot Nothing Then
                End If
            End Try
        End Sub
        'Required by the Component Designer
        Private components As System.ComponentModel.IContainer
        'NOTE: The following procedure is required by the Component Designer
        'It can be modified using the Component Designer.
        'Do not modify it using the code editor.
        <System.Diagnostics.DebuggerStepThrough()> _
        Private Sub InitializeComponent()
    		Me.MyFirstTab = Me.Factory.CreateRibbonTab
    		Me.Group1 = Me.Factory.CreateRibbonGroup
    		Me.Button1 = Me.Factory.CreateRibbonButton
    		Me.MyFirstTab.Label = "MyFirstTab"
    		Me.MyFirstTab.Name = "MyFirstTab"
    		Me.Group1.Label = "Group1"
    		Me.Group1.Name = "Group1"
    		Me.Button1.Label = "Button1"
    		Me.Button1.Name = "Button1"
    		Me.Name = "MyRibbonExample"
    		Me.RibbonType = "Microsoft.Outlook.Explorer"
    End Sub
    	 Friend WithEvents MyFirstTab As Microsoft.Office.Tools.Ribbon.RibbonTab
    	 Friend WithEvents Group1 As Microsoft.Office.Tools.Ribbon.RibbonGroup
    	 Friend WithEvents Button1 As Microsoft.Office.Tools.Ribbon.RibbonButton
    End Class
    Partial Class ThisRibbonCollection
        <System.Diagnostics.DebuggerNonUserCode()> _
        Friend ReadOnly Property MyRibbonExample() As MyRibbonExample
                Return Me.GetRibbon(Of MyRibbonExample)()
            End Get
        End Property
    End Class


    • Edited by dayneo_ Thursday, December 20, 2012 11:12 AM Formatting
    Thursday, December 20, 2012 11:10 AM
  • Well done, problem solved!

    Ok, DamianD pointed me in the right direction.

    The history: I remember a previous situation in which my VS2010 VSTO probject would not build due to an error referring to the FindRibbons task. This error started happening after installing VS2012. At that point I had found another thread proposing that I edit the Microsoft.VisualStudio.Tools.Office.targets file under %programfiles%\MSBuild\Microsoft\VisualStudio\v10.0\ and comment out the FindRibbons tag and a few other related tags. After making the changes, my VS2010 VSTO project compiled correctly.

    I assume that at some point after that, the VS2010 SP1 was installed. And I assume it was after this point that the ribbons stopped working.

    The solution: After confirming that VS2010 SP1 was installed, I reverted the Microsoft.VisualStudio.Tools.Office.targets file back to it's original. And now ribbons from both VS2010 and VS2012 solutions are visible in the Outlook interface.

    Many thanks to the contributors.


    Thursday, December 20, 2012 12:27 PM