Line to move origEmail to subfolder within a reply macro

Status
Not open for further replies.

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
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
O On click,I want to change subject line of selected mail and then reply to particular email and move Using Outlook 3
H using VBA to edit subject line Outlook VBA and Custom Forms 0
O VBA - Regex - remove double line spacing Outlook VBA and Custom Forms 1
F Auto changing email subject line in bulk Using Outlook 2
R Outlook Working off line Using Outlook 0
D Prompt to prefix subject line whenever sending an email Outlook VBA and Custom Forms 3
Witzker Add a text line at the end of the note field in all selected Contacts Outlook VBA and Custom Forms 7
R 550 maximum allowed line length is 998 octets, got 1012 Using Outlook 7
2 How to get rid of the "Emailing:" prefix in the subject line Using Outlook 1
E Outlook - eliminate same adresses from to, and bc line Outlook VBA and Custom Forms 0
D ISOmacro to extract active mail senders name and email, CC, Subject line, and filename of attachments and import them into premade excel spread sheet Outlook VBA and Custom Forms 2
O Carriage Return - Line Feeds - exporting Calendar events Using Outlook 0
D cannot view emails in View pane (in the right pane), I only see one line or nothing Using Outlook 21
A Macro to file emails into subfolder based on subject line Outlook VBA and Custom Forms 1
V vBA for searching a cell's contents in Outlook and retrieving the subject line Outlook VBA and Custom Forms 1
C Macro to extract sender name & subject line of incoming emails to single txt file Outlook VBA and Custom Forms 3
B User defined field for messages with 'me' in the [To], [Cc] line Using Outlook 0
C How to rename subject line and forward the email Outlook VBA and Custom Forms 2
B Add Prefix text to Subject Line Using Outlook 1
M Convert Subject Line to Internet Header version of Subject Outlook VBA and Custom Forms 10
O Double line spacing - solved with minor drawback Using Outlook 0
J VBA Outlook : Subject line : Cut and Paste name to heading , number to very end of the body of Email Outlook VBA and Custom Forms 1
N Wide Line Spacing in Folder pane 2016 Using Outlook 18
C Change Subject Line in Selected Emails Outlook VBA and Custom Forms 1
O Adding a new account - "CompanyL (none)" line is added Using Outlook 5
C Outlook - cannot save subject line changes Using Outlook 2
N Select Appointment subject line from combobox or list Outlook VBA and Custom Forms 1
M Subject Line Automation - Trigger Script Delayed Outlook VBA and Custom Forms 2
R Sending email copy (*.msg file) of sent email if subject line contains specific string. Outlook VBA and Custom Forms 1
J Marco in search of text in subject line Using Outlook 8
N automatic response with an attachment based on the subject line Outlook VBA and Custom Forms 1
K ind specific Subject line from outlook and copy the content of the email body to exce Outlook VBA and Custom Forms 0
C replace subject line generated by converting a word document to PDF and sending it to an email Using Outlook 8
C Outlook Subject Line Macro Outlook VBA and Custom Forms 0
Harald Olsen Automated insertion of address in address line Using Outlook 1
P Can't see full text in From and Subject line Using Outlook 1
D dropdown list in new email in subject line Using Outlook 4
T In-line reply style in Outlook Outlook VBA and Custom Forms 20
N Rename Subject Line with Email Content Outlook VBA and Custom Forms 3
Stilgar Relsik Create a rule to copy text from an email and paste it in the subject line. Using Outlook 1
P MS OUTLOOK 2013 - Adding Sender on the CC line Using Outlook 5
J Remove extra line above signature in reply Outlook VBA and Custom Forms 5
I Make a macro in line rather than pop out Outlook VBA and Custom Forms 0
Diane Poremsky Editing the Subject Line in Outlook Using Outlook 0
Aussie I Change the Subject Line ... but after it is moved the subject has reverted Using Outlook 1
Diane Poremsky Add a file number or keyword to the subject line of messages Using Outlook 0
O How to set subject line in replies using VBA Outlook VBA and Custom Forms 1
B VBA to prepend subject line Using Outlook 0
M Outlook adds strange characters inserted into the Subject Line Using Outlook 2
O How to display multi-line task in To-Do List - Outlook 2010 Using Outlook 1

Similar threads

Back
Top