Is there a way in Outlook 2019 to send an email to a 3rd party based on content

39 Views Asked by At

At work I have access to a generic email account when a coworker needs something sent from that account they send it to me then I send a previously created email to the address they provide me.

Is there a simple way to automate this so they could send me an email with a code word in the subject or body then have the email of the customer and the customer id and have my account send the saved boilerplate to the customer automatically?

I haven’t tried anything yet

1

There are 1 best solutions below

0
Eugene Astafiev On

In Outlook you can create a VBA macro where you can handle incoming emails. The Outlook object model provides all the require properties, methods and events for such tasks. The NewMailEx event fires when a new message arrives in the Inbox and before client rule processing occurs. Use the Entry ID represented by the EntryIDCollection string to call the NameSpace.GetItemFromID method and process the item. This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem.

In the NewMailEx event may check the Subject property value and then call the MailItem.Forward method which executes the Forward action for an item and returns the resulting copy as a MailItem object.

But I'd suggest starting from the Getting started with VBA in Office guide to be familiar with VBA in Outlook.