Kenny Outzen
New Member
Hi,
I am looking for help.
I am currently trying to set up 8 different macros, where i reply to different types of e-mails using standard templates.
So far i have gotten this piece of code to work.
"
Sub Reply_Scripting()
'Open Confirmation email template.
Dim origEmail As MailItem
Dim replyEmail As MailItem
Set origEmail = Application.ActiveWindow.Selection.Item(1)
Set replyEmail = Application.CreateItemFromTemplate("Y:\Templates\Thank you for your order.oft")
replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.reply.HTMLBody
replyEmail.Display
End Sub
"
What i am missing, is:
Hope anyone can help.
Regards,
Kenny
I am looking for help.
I am currently trying to set up 8 different macros, where i reply to different types of e-mails using standard templates.
So far i have gotten this piece of code to work.
"
Sub Reply_Scripting()
'Open Confirmation email template.
Dim origEmail As MailItem
Dim replyEmail As MailItem
Set origEmail = Application.ActiveWindow.Selection.Item(1)
Set replyEmail = Application.CreateItemFromTemplate("Y:\Templates\Thank you for your order.oft")
replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.reply.HTMLBody
replyEmail.Display
End Sub
"
What i am missing, is:
- how can i get the e-mail to include the original sender of the e-mail as the new recipient
- how to i reuse the subject from the original e-mail? (ie. if i get an e-mail with subject XXX - i want my macro to get the old subject, and return Re: XXX)
Hope anyone can help.
Regards,
Kenny