So, here's my situation, I'm programming a new button into my active email ribbon to add a "CUI" disclaimer to the subject and the body of the email.
I'd like to open up a new email, type a message, click the button, and it add the disclaimer before the text in the subject and before the text in the body.
Right now, every time I try, it deletes and replaces everything in the email like a template when I click the button.
Here's the code:
Sub AddCUI()
Set myFolder = Application.ActiveWindow.CurrentItem
Set myItem = Application.ActiveWindow.CurrentItem
myItem.Display
With myItem
.Subject = "CUI"
.HTMLBody = "body of text here"
.Display
End With
End Sub
I'm not much of a coder, but I'm trying to help out a larger group of people with this.
Bookmarks