How do I add a Confidential button on the standard toolbar of an e-mail in Outlook?

If you open a new e-mail, then click View...Options, you will see a drop down for Sensitivity in the Message Settings section. In that drop down is an option for Confidential. Is there a way to add that option as a button on the toolbar?
LVL 1
itagent007Asked:
Who is Participating?
 
David LeeCommented:
There are two ways to avoid the prompt for enabling macros.  One, set the macro security level to Low.  I don't recommend that since it leaves you vulnerable to Outlook based macro viruses and worms.  Two, sign the code.  Here's a link to instructions for doing that: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_dsvba.asp
0
 
AndreDekoltaCommented:
What Office version? OS?
0
 
AndreDekoltaCommented:
Add a button, menu, or command
Do one of the following:

Add a button or menu to a toolbar

On the View menu, point to Toolbars, and then click the toolbar you want to display.
On the toolbar, click the Toolbar Options arrow .
Point to Add or Remove Buttons, and then click Customize.
Do one of the following:
Add a button

Click the Commands tab.
In the Categories list, click a category for the command you want the button to perform.
In the Commands list, click the command or macro you want and drag it to the displayed toolbar.
Add a menu

Click the Commands tab.

In the Categories list, click New Menu.

In the Commands list, click New Menu and drag it to the displayed toolbar.

Right-click the new menu on the toolbar, type a name in the Name box on the shortcut menu, and then press ENTER.

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
David LeeCommented:
Greetings, itagent007.

The code below will add a toolbar button for making the message open in the window Confidential.  Follow these instructions to use it.
1.  Start Outlook
2.  Click Tools->Macros->Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and select ThisOutlookSession
4.  Copy the code in <First Code Block> and paste it into the right-hand pane of the VB editor
5.  If not already expanded, expand Modules and select Module1.
6.  Copy the code in <Second Code Block> and paste it into the right-hand pane of the VB editor
7.  Click the diskette icon on the toolbar to save the code
8.  Close the VB editor
9.  Click Tools->Macros->Security
10.  Change the security level to Medium
11.  Click Ok
12.  Close Outlook
13.  Start Outlook
14.  You'll receive a dialog-box telling you that ThisOutlookSession contains macros and asking if you want to enable them.  Click Enable Macros.
15.  Create a new message.  You should see a button with a safe on it right next to the Options button.  Clicking it will make the message Confidential.

'<First Code Block>
Private WithEvents olkInspectors As Outlook.Inspectors, _
    WithEvents olkControl As CommandBarButton

Private Sub Application_Quit()
    Set olkInspectors = Nothing
End Sub

Private Sub Application_Startup()
    Set olkInspectors = Application.Inspectors
End Sub

Private Sub olkInspectors_NewInspector(ByVal Inspector As Inspector)
    Dim olkBar As Office.CommandBar
    If Inspector.CurrentItem.Class = olMail And Not Inspector.CurrentItem.Sent Then
        Set olkBar = Inspector.CommandBars.Item("Standard")
        'Test to see if the toolbar button already exists
        Set olkControl = olkBar.FindControl(, , "Confidential")
        'If not found, then create button
        If olkControl Is Nothing Then
            Set olkControl = olkBar.Controls.Add(, , , 22, True)
            With olkControl
                .OnAction = "MakeMessageConfidential"
                .Caption = "Confidential"
                .FaceId = 2654
                .Style = msoButtonIcon
                .Tag = "Confidential"
                .TooltipText = "Set this message's sensitivity to Confidential"
                .Visible = True
            End With
        End If
    End If
End Sub
'</First Code Block>

'<Second Code Block>
Sub MakeMessageConfidential()
    Application.ActiveInspector.CurrentItem.Sensitivity = olConfidential
End Sub
'</Second Code Block>

Cheers!
0
 
itagent007Author Commented:
Hey BlueDevilFan, you're the closest so far to get what I'm looking for. Is there any way though to not have a user be prompted to enable the macro so that the Confidential button visible? We have over 5,000 employees, and it would be best if this can be made seamless to the users. I just want to be able to open a new e-mail without having to be prompted.
0
 
itagent007Author Commented:
Thanks for the help on us!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.