Hi
I'm writing an Addin for Outlook using VB.Net 2008.
The Addin is working correctly and I have added a button on the menu. When I fire up Outlook I move to the 'Add-ins' tab and see my add-in with my command button, but the caption for the add-in says 'Menu Commands' and I cannot find any way to change it.
Any ideas?
Attachment 94323
I'm writing an Addin for Outlook using VB.Net 2008.
The Addin is working correctly and I have added a button on the menu. When I fire up Outlook I move to the 'Add-ins' tab and see my add-in with my command button, but the caption for the add-in says 'Menu Commands' and I cannot find any way to change it.
Any ideas?
Code:
Private Sub CheckIfMenuBarExists()
Try
Dim foundMenu As Microsoft.Office.Core.CommandBarPopup = _
CType(applicationObject.ActiveExplorer.CommandBars.ActiveMenuBar.FindControl( _
Microsoft.Office.Core.MsoControlType.msoControlPopup, System.Type.Missing, Common.UniqueTag, True, True), Microsoft.Office.Core.CommandBarPopup)
If foundMenu IsNot Nothing Then
foundMenu.Delete(True)
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub AddMenuBar()
Try
Dim menuBar As Microsoft.Office.Core.CommandBar = applicationObject.ActiveExplorer.CommandBars.ActiveMenuBar
If menuBar IsNot Nothing Then
Dim controlCount As Integer = menuBar.Controls.Count
m_SettingsMenuCommand = CType(menuBar.Controls.Add(Type:=Microsoft.Office.Core.MsoControlType.msoControlButton, _
Before:=controlCount, Temporary:=True), Microsoft.Office.Core.CommandBarButton)
With m_SettingsMenuCommand
.Caption = "&Settings"
.Tag = "SettingsMenuOption"
.FaceId = 65
End With
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub