Hello, i am trying to write a macro in outlook 2003 to mark a new email confidential, and add "Confidential" to the beginning of the subject line. This is what i have so far:
Public Sub MakeThisConfidential()
Dim Message As Outlook.MailItem
Set Message = Outlook.ActiveInspector.CurrentItem
Message.Subject = "Confidential! - " & objMsg.Subject
Message.ActiveInspector.CurrentItem.Sensitivity = olConfidential
Message.ActiveInspector.CurrentItem.Save
End Sub
When i try to run it i get an error:
Runtime Error '91': Object variable or With block not set.
It says the error is with the set line.
Anyone have any ideas how to resolve this?
Any advice is very much appriciated!
Thanks!!
Public Sub MakeThisConfidential()
Dim Message As Outlook.MailItem
Set Message = Outlook.ActiveInspector.CurrentItem
Message.Subject = "Confidential! - " & objMsg.Subject
Message.ActiveInspector.CurrentItem.Sensitivity = olConfidential
Message.ActiveInspector.CurrentItem.Save
End Sub
When i try to run it i get an error:
Runtime Error '91': Object variable or With block not set.
It says the error is with the set line.
Anyone have any ideas how to resolve this?
Any advice is very much appriciated!
Thanks!!