Forwarding attachments in email received

Iqbal Khan

New Member
Outlook version
Outlook 2013 64 bit
Email Account
POP3
I am looking for vba code to forward attachments in an email received to be forwarded to a particular email id.

I can set rule if the attachment count is one however I need to send each attachments in the email individually to the email id.

Thank you
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Since you cannot directly add an attachment from one email to another, you first need to save each attachment as a file, then add the file it to the new email.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
The macros at Run a Script Rule: Send a New Message when a Message Arrives should get you started - since you need to send each attachment separately, you'll need to get a count then loop through them, then add each to a new message. (I'm reading your request as 1 message arrives with nn attachments, you need to send them to a new address in nn messages with one attachment each. If this isn't what you mean, and you will resend 1 new message for each message that arrives, it will be easier.)

i have forwarding macros at Run a Script Rule: Change Subject then Forward Message - but you're not really forwarding, just sending the attachments on. if you need to grab addresses from the body, it has a sample that does that.
 
Last edited:

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
oh, and one other thing, signatures that have images in them will count as 1 attachment - you should use the from field or other conditions to filter them out. (The macro can check the file size, as long as the attachment you need to forward is not too small.)

I have a copyattachments function in the macro at Reply or ReplyAll with Attachments that shows how to copy attachments to a message.
 
Top