Auto reply to specific e-mail with specific words in e-mail subject
Category: outlook for developers
Question
Wasi Hassan on Thu, 19 Jul 2018 16:17:53
Hello Dev's,
I want to send specific e-mail templates in response of e-mail where specific word mention in e-mail subject. For e.g
Some one sent me mail and there is word "SHANGHAILCL" mention in e-mail subject so Outlook automatically select my desire Outlook template as attachment and reply in the response of "SHANGHAILCL". I want to use it for sending quotations to clients.
I have Outlook 2010.
Your help will be in this regard will be highly appreciated.
Replies
The Grim on Thu, 19 Jul 2018 16:26:04
how about; no.
Steve Fan on Fri, 20 Jul 2018 02:46:03
Hi Hassan,
This is not possible with Outlook build-in options. However, this may be possible via codes. I'll move your question to the dedicated Outlook for Developers forum, hope you can find a solution there:
https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev
Thanks,
Steve Fan
Terry Xu - MSFT on Mon, 23 Jul 2018 09:12:47
Hello Wasi Hassan,
You could use Alt+F11 open VBE and then put below code in ThisOutlookSession module and then go to main explorer to create a Rule like below screenshots.
Sub AutoReply(receivedItem As MailItem) Dim objMail As MailItem Set objMail = receivedItem.Reply objMail.Body = "This is a auto reply mail" 'use below code to display the reply mail for testing objMail.Display 'use below code to send the reply mail directly 'objMail.Send End Sub
Best Regards,
Terry