Delete right-click context menu in Outlook 2007

Is there a way to remove the Print item from the context menu when you right-click on an email using VBA?

I permanently right-clicked to reply to email, only to accidentally click Printand send Outlook directly to the printer faster than I can stop.

alt text

NB: I am using Outlook 2007.

+5
source share
2 answers

TcKs, . , , . Outlook, Alt + F11, Microsoft Office Outlook "". ThisOutlookSession. . , . ActionID - . ID , .

Private Sub Application_ItemContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Selection As Selection)

   Dim cmdTemp As Office.CommandBarControl

   If Selection.Count > 0 Then

      Select Case TypeName(Selection.Item(1))

         Case "MailItem"

            For Each cmdTemp In CommandBar.Controls

               If cmdTemp.Caption = "&Print" Then

                  cmdTemp.Delete
                  Exit For

               End If

            Next cmdTemp

         Case Else

            'Debug.Print TypeName(Selection.Item(1))

      End Select

   End If

End Sub
+8

Thera - , Outlook:

+7

All Articles