richardwing
Member
- Outlook version
- Outlook 365 64 bit
- Email Account
- Office 365 Exchange
Hello I really love this forum. 
I am really new to VBA.
I am looking to auto reply and auto forward the same email, each with a custom html body message, when the email arrives into a specific folder.
I located this vba to auto forward emails. but its not folder specific nor does it have the reply functionality either.
Could someone help with this. I am willing to pay as well. Just direct me to the correct place to discus payment.
Lastly, is there a bit of code that I can add to allow any of the vba scripts that I come across that run for inbox items to only run in specific folders?
Thanks for your time and direction.
Richard

I am really new to VBA.
I am looking to auto reply and auto forward the same email, each with a custom html body message, when the email arrives into a specific folder.
I located this vba to auto forward emails. but its not folder specific nor does it have the reply functionality either.
Code:
Sub ForwardEmail(Item As Outlook.MailItem)
// Determine if it’s an email
If TypeName(Item) = "MailItem" Then
With Item.Forward
.Subject = ("ITS - ") & Item.Subject
.Recipients.Add "backup@email.com"
.Recipients.Add "backup2@email.com"
' You need to overwrite the Body or HTMLBody to get rid of the auto signature
.HTMLBody = Item.HTMLBody ' <-- Or use .Body for Plain Text
'.Display ' <-- For Debug
.Send ' <-- Put break here to Debug
End With
End If
End Sub
Could someone help with this. I am willing to pay as well. Just direct me to the correct place to discus payment.
Lastly, is there a bit of code that I can add to allow any of the vba scripts that I come across that run for inbox items to only run in specific folders?
Thanks for your time and direction.
Richard