0
votes

I am writing a VSTO Outlook Add-In and in the machine I am developing, I can add a custom ribbon group to the home tab but when I deploy the add-in through a VS installer, the home tab group does not show. I have set the controlID to TabMail and I have checked the previous answers to no avail. Using Visual Studio 2015 and Outlook 2013.

The following is the auto-generated designer class definition for this ribbon:

Partial Class Ribbon3
Inherits Microsoft.Office.Tools.Ribbon.RibbonBase

<System.Diagnostics.DebuggerNonUserCode()> _
Public Sub New(ByVal container As System.ComponentModel.IContainer)
    MyClass.New()
    InitializeComponent()
    'Required for Windows.Forms Class Composition Designer support
    If (container IsNot Nothing) Then
        container.Add(Me)
    End If

End Sub

<System.Diagnostics.DebuggerNonUserCode()> _
Public Sub New()
    MyBase.New(Globals.Factory.GetRibbonFactory())

    'This call is required by the Component Designer.
    InitializeComponent()

End Sub

'Component overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
    Try
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
    Finally
        MyBase.Dispose(disposing)
    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()
    Dim RibbonDialogLauncherImpl1 As Microsoft.Office.Tools.Ribbon.RibbonDialogLauncher = Me.Factory.CreateRibbonDialogLauncher
    Me.Tab1 = Me.Factory.CreateRibbonTab
    Me.EIP = Me.Factory.CreateRibbonGroup
    Me.Button1 = Me.Factory.CreateRibbonButton
    Me.Button3 = Me.Factory.CreateRibbonButton
    Me.Button2 = Me.Factory.CreateRibbonButton
    Me.Label1 = Me.Factory.CreateRibbonLabel
    Me.EditBox1 = Me.Factory.CreateRibbonEditBox
    Me.Button4 = Me.Factory.CreateRibbonButton
    Me.Tab1.SuspendLayout()
    Me.EIP.SuspendLayout()
    Me.SuspendLayout()
    '
    'Tab1
    '
    Me.Tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office
    Me.Tab1.ControlId.OfficeId = "TabMail"
    Me.Tab1.Groups.Add(Me.EIP)
    Me.Tab1.Label = "TabMail"
    Me.Tab1.Name = "Tab1"
    '
    'EIP
    '
    Me.EIP.DialogLauncher = RibbonDialogLauncherImpl1
    Me.EIP.Items.Add(Me.Button1)
    Me.EIP.Items.Add(Me.Button3)
    Me.EIP.Items.Add(Me.Button2)
    Me.EIP.Items.Add(Me.Label1)
    Me.EIP.Items.Add(Me.EditBox1)
    Me.EIP.Items.Add(Me.Button4)
    Me.EIP.KeyTip = "O"
    Me.EIP.Label = "EIP"
    Me.EIP.Name = "EIP"
    Me.EIP.Position = Me.Factory.RibbonPosition.AfterOfficeId("Find")
    '
    'Button1
    '
    Me.Button1.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge
    Me.Button1.Label = "Archive to EIP"
    Me.Button1.Name = "Button1"
    Me.Button1.OfficeImageId = "FileOpenRecentFile"
    Me.Button1.ShowImage = True
    '
    'Button3
    '
    Me.Button3.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge
    Me.Button3.Label = "Update EIP List"
    Me.Button3.Name = "Button3"
    Me.Button3.OfficeImageId = "ChangeFolderDownloadSettings"
    Me.Button3.ScreenTip = "Rebuild the internal list matching EIP numbers to EIP directories"
    Me.Button3.ShowImage = True
    '
    'Button2
    '
    Me.Button2.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge
    Me.Button2.Label = "Open EIP Folder"
    Me.Button2.Name = "Button2"
    Me.Button2.OfficeImageId = "AlwaysMoveToFolder"
    Me.Button2.ShowImage = True
    '
    'Label1
    '
    Me.Label1.Label = "Active EIP"
    Me.Label1.Name = "Label1"
    '
    'EditBox1
    '
    Me.EditBox1.Label = "Active EIP"
    Me.EditBox1.Name = "EditBox1"
    Me.EditBox1.ScreenTip = "EIP number to associate with message if none found"
    Me.EditBox1.ShowLabel = False
    Me.EditBox1.Text = Nothing
    '
    'Button4
    '
    Me.Button4.Label = "Clear"
    Me.Button4.Name = "Button4"
    Me.Button4.OfficeImageId = "Clear"
    Me.Button4.ShowImage = True
    '
    'Ribbon3
    '
    Me.Name = "Ribbon3"
    Me.RibbonType = "Microsoft.Outlook.Explorer"
    Me.Tabs.Add(Me.Tab1)
    Me.Tab1.ResumeLayout(False)
    Me.Tab1.PerformLayout()
    Me.EIP.ResumeLayout(False)
    Me.EIP.PerformLayout()
    Me.ResumeLayout(False)

End Sub
Friend WithEvents EIP As Microsoft.Office.Tools.Ribbon.RibbonGroup
Friend WithEvents Button1 As Microsoft.Office.Tools.Ribbon.RibbonButton
Friend WithEvents Button3 As Microsoft.Office.Tools.Ribbon.RibbonButton
Friend WithEvents Tab1 As Microsoft.Office.Tools.Ribbon.RibbonTab
Friend WithEvents Button2 As Microsoft.Office.Tools.Ribbon.RibbonButton
Friend WithEvents EditBox1 As Microsoft.Office.Tools.Ribbon.RibbonEditBox
Friend WithEvents Label1 As Microsoft.Office.Tools.Ribbon.RibbonLabel
Friend WithEvents Button4 As Microsoft.Office.Tools.Ribbon.RibbonButton
End Class
1

1 Answers

1
votes

A Ribbon group will not show if any of the controls that it uses is not installed on the host machine. I had to set the vsto runtime as a prerequisite and then it all worked well. Select the installer project, then after selecting prerequisites in the properties window, select the vsto runtime as a prerequisite.