Outlook Auto reply

E

eatbread8

Outlook 2003

Incoming email (specific user)

I have been cc: on this email and would like to auto reply to the To:
user (not the From:) with a specific outlook template.

How can I accomplish this?

Any help or direction would be greatly appreciated.

Thank you in advance.
 
E

Eric Legault [MVP - Outlook]

Try this:

Sub ReplyToTheToRecipient()
Dim objMsg As Outlook.MailItem, objCurrentMessage As Outlook.MailItem

'Must have the message you want to reply to open
If Application.ActiveInspector Is Nothing Then Exit Sub

Set objMsg = Application.CreateItemFromTemplate("C:\Temp\test.oft")
Set objCurrentMessage = Application.ActiveInspector.CurrentItem
objMsg.To = objCurrentMessage.To
objMsg.Display

Set objCurrentMessage = objMsg
Set objMsg = Nothing
End Sub
 
Top