automatic response with an attachment based on the subject line


New Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server

I would like to know how I create an automatic email response with an attachment based on the subject line.

To clarify: if somebody send "Project X" in the subject, where "project" is the trigger and "X" is the variable, outlook needs to send automatically to this person the file named X.pdf from a fixed folder.

Would be super if someone could help me with that.

Kind regards,

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
there are some samples here Run a script rule: Autoreply using a template - if the attachment name is in the subject in full, all attachments are stored in the same folder, and you can easily pick it out using code, then you just need to get the name using instr function. otherwise, you can use select case or an arrary to match the code word with the attachment name.

code samples for adding attachments is here - Use an Outlook Macro to Send Files by Email