nathaniel.williams
New Member
- Outlook version
- Outlook 365 64 bit
- Email Account
- Office 365 Exchange
Hello,
I have successfully created a reply macro using an Outlook Template with attachments. Now I'd like to take that same macro a step further and have it also mark the original email as read and move it to a subfolder that we used called "Actions Completed." Are there a couple of lines of code I can add to my macro to accomplish this? Here's what my macro looks like right now:
Sub NewRegistration()
Dim origEmail As MailItem
Dim replyEmail As MailItem
Set origEmail = Application.ActiveWindow.Selection.Item(1)
Set replyEmail = Application.CreateItemFromTemplate("C:\Users\Nathaniel.Williams\AppData\Roaming\Microsoft\Templates\New Registration.oft")
replyEmail.To = origEmail.SenderEmailAddress
replyEmail.CC = origEmail.CC
replyEmail.Subject = origEmail.Subject
replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.Reply.HTMLBody
replyEmail.Display
End Sub
Thanks in advance!
Nate
I have successfully created a reply macro using an Outlook Template with attachments. Now I'd like to take that same macro a step further and have it also mark the original email as read and move it to a subfolder that we used called "Actions Completed." Are there a couple of lines of code I can add to my macro to accomplish this? Here's what my macro looks like right now:
Sub NewRegistration()
Dim origEmail As MailItem
Dim replyEmail As MailItem
Set origEmail = Application.ActiveWindow.Selection.Item(1)
Set replyEmail = Application.CreateItemFromTemplate("C:\Users\Nathaniel.Williams\AppData\Roaming\Microsoft\Templates\New Registration.oft")
replyEmail.To = origEmail.SenderEmailAddress
replyEmail.CC = origEmail.CC
replyEmail.Subject = origEmail.Subject
replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.Reply.HTMLBody
replyEmail.Display
End Sub
Thanks in advance!
Nate