Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Public Sub Confidential()
  2.  
  3. Dim Item As Outlook.MailItem
  4. Dim oInspector As Inspector
  5. Dim strSubject As String
  6.  
  7. Set oInspector = Application.ActiveInspector
  8. If oInspector Is Nothing Then
  9. Set Item = Application.ActiveExplorer.Selection.Item(1)
  10. Else
  11. Set Item = oInspector.CurrentItem
  12. End If
  13.  
  14. strSubject = Item.Subject
  15.  
  16. ' Remove previous Confidential and Legally Privileged
  17. strSubject = Replace(strSubject, "Confidential and Legally Privileged ", "")
  18.  
  19. ' Prefix subject with Confidential and Legally Privileged
  20. strSubject = "Confidential and Legally Privileged " & strSubject
  21.  
  22. ' Set the message subject
  23. Item.Subject = strSubject
  24.  
  25.  
  26. Set Item = Nothing
  27. Set oInspector = Nothing
  28.  
  29.  
  30. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement