Confidential Flag

M

Michael Hyatt

I want a toolbar button on the New message and Reply message form that will
select the "Confidential" flag on. As you know, you can do this by selecting
View | Options | Message Settings | Sensitivity | Confidential. I found a
button for Options, but I have not been able to find one for Confidential.
(If I'm missing something, please let me know.)

Can I write a simple VBA macro and attach it to a button? What is the code
for changing the sensitvity of the current message?

Thanks.
 
K

KePaHa

Sub MacroName()
Outlook.ActiveInspector.CurrentItem.Sensitivity = olConfidential
End Sub
 
M

Michael Hyatt

Thanks.

How can I test whether or not the CurrentItem is a reply window (a message
the user is replying to verses a new message he is composing)?
 
M

Michael Hyatt

I answered my own question. This is a bit of a kludge, but it works:

Sub ConfidentialFlag()

strSubject = Outlook.ActiveInspector.CurrentItem.Subject

If Left(strSubject, 3) = "RE:" Then ' This is a reply message
Outlook.ActiveInspector.CurrentItem.Sensitivity = olConfidential
strBody = Outlook.ActiveInspector.CurrentItem.HTMLBody
Outlook.ActiveInspector.CurrentItem.HTMLBody = _
"<FONT face=Verdana size=2 color=blue>" & _
"<STRONG>CONFIDENTIAL - DO NOT FORWARD</STRONG>" & _
"</FONT><br><br>" & strBody
SendKeys "{DOWN 4}"
Else ' This is a
new message
Outlook.ActiveInspector.CurrentItem.Sensitivity = olConfidential
strBody = Outlook.ActiveInspector.CurrentItem.HTMLBody
Outlook.ActiveInspector.CurrentItem.HTMLBody = _
"<FONT face=Verdana size=2>" & _
"<STRONG>CONFIDENTIAL - DO NOT FORWARD</STRONG>" & _
"</FONT><br><br>" & strBody
End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top