How to Auto Forward the Attachments Only for Specific Incoming Emails in Outlook

Some users would like to auto forward the attachments of specific incoming emails with the original message body cleared in Outlook. Here we’ll introduce a quick way to realize it.

At times, you may just want to forward the attachments only of a specific email to someone else. To realize “auto forward email”, you can simply make use of a rule. However, there is not a rule supporting “auto forward attachment only”. Hence, if you have this requirement, you have to resort to some scripting. Here we’ll share it with you.

Auto Forward the Attachments Only for Specific Incoming Emails in Outlook

Auto Forward the Attachments Only for Specific Incoming Emails

  1. In the first place, you have to launch your Outlook application as normal.
  2. Then, after entering Outlook screen, tap on the “Alt + F11” keys.
  3. At once, you’ll get access to Outlook VBA editor. The “Microsoft Visual Basic for Applications” window will display.
  4. In this window, you need to open an unused blank module.
  5. Subsequently, copy the piece of VBA code below into this module.
Sub ForwardAttachmentsOnly(objMail As Outlook.MailItem)
    Dim objForward As Outlook.MailItem
 
    'Get the specific incoming emails
    'You can change the condition as per your needs
    If (InStr(LCase(objMail.Subject), "datanumen project") > 0) Then
       'Check if the mail has attachments
       If objMail.Attachments.count > 0 Then
          Set objForward = objMail.Forward
          With objForward
               'Clear the original body
              .Body = ""
               'Change the recipients as per your needs
              .Recipients.Add "someone@datanumen.com"
              .Recipients.ResolveAll
              .Send
          End With
       End If
    End If
End Sub

VBA Code - Auto Forward the Attachments Only for Specific Incoming Emails

  1. After that, you can exit the current window.
  2. Then, change your Outlook macro security settings to permit all macros.
  3. Later, you have to combine this macro with an Outlook rule.
  • First off, head to “File” menu and hit the “Manage Rules & Alerts” button.
  • In the new dialog box, click on the “New Rule”.
  • Then, in the subsequent screen, select “Apply rule on messages I receive” > “Next”.
  • Afterwards, you can specify the rule conditions depending on your needs and hit “Next”.
  • Next, as for rule action, you should select “Run a script” and enable the previously added macro.
  • Ultimately, follow the onscreen wizards to complete rule setup.
  1. From now on, every time when a new email meeting your criteria arrives in your mailbox, Outlook will auto forward its attachments to the predefined recipients.

Essential Actions in Case of Outlook Corruption

If you have a bad habit of exiting Outlook application improbably or downloading unknown files from untrusty emails, Outlook will be pretty prone to corruptions. Once it gets compromised, you have to take immediate actions to fix Outlook file. For instance, you can use the Scanpst to take a shot first of all. If it doesn’t work, you can utilize a specialized external tool such as DataNumen Outlook Repair. It is able to recover Outlook file with minimum data loss.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql fix and outlook repair software products. For more information visit www.datanumen.com

2 responses to “How to Auto Forward the Attachments Only for Specific Incoming Emails in Outlook”

Leave a Reply

Your email address will not be published. Required fields are marked *