Private Sub Application_FolderContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Folder As Folder)
Const msoControlButton = 1
Const msoButtonIconAndCaption = 3
Dim objButton As CommandBarButton
Set objButton = CommandBar.Controls.Add(msoControlButton)
With objButton
.Style = msoButtonIconAndCaption
.Caption = "Folder Details"
'List of face IDs here: http://www.kebabshopblues.co.uk/2007/01/04/visual-studio-2005-tools-for-office-commandbarbutton-faceid-property/'
.FaceId = 355
'Change the subroutine path on the next line'
.OnAction = "Project1.Module76.DisplayFolderInformation"
End With
End Sub
Sub DisplayFolderInformation()
Dim olkFolder As Outlook.Folder
Set olkFolder = Application.ActiveExplorer.CurrentFolder
msgbox olkFolder.Description, vbInformation + vbOKOnly, "Folder Information"
End Sub
|