Auto Forward - Include Attachment and change Subject depending on original sender

Status
Not open for further replies.

JamesW

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Please help me create a script that will help me save A LOT of time. I need an auto forward that will include the attachment, all to the SAME EMAIL, but I need to change the subject based on who I received the email from(up to 5 different ones). Maybe an IF statement or WHILE loop? Any help would be greatly appreciated!! Thank you in advance!!

Example:
Receive email from "user1[at]email.com" with attachment
Auto forward to "email[at]email.com" with attachment and Subject="From User1" & .Subject
OR
Receive email from "user2[at]email.com" with attachment
Auto forward to "email[at]email.com" with attachment and Subject="From User2" & .Subject
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I have some macros that run from a rule - Run a Script Rule: Change Subject then Forward Message - it can be turned into an itemadd macro if you are forwarding most mail that arrives in the mailbox or its a shared mailbox in your profile.

if the messages all go to the same address and have the same subject format, you won't need an if statement (or a select case). If you also need to change the subject format, use two rules or a select case to set the subject string.

before myForward.Send, you'd add
myForward.subject = "From :" & item.senderemailaddress & " " & item.subject

this shows how to use an item add macro - How to use an ItemAdd Macro
 

JamesW

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Thank you so much for your reply Diane!

I actually saw the Run a Script Rule and like that, but I failed to clarify something about the subject info. :(

I need to be able to insert a certain code/text into the subject for the different senders.
Ex: If from "sender1" - Then myForward.subject="sender1Code" & item.subject

I know this may be a bit more involved, but if possible, it would save me from writing a lot of separate scripts.
 
Status
Not open for further replies.
Top