When receiving a new email with specific attachments, if you are used to manually flagging it for follow up, why don’t you directly let your Outlook to auto flag it? This article will guide you to achieve this feature.
When it comes to auto flagging incoming emails, perhaps you will think of using Outlook rules in the first place. Outlook does provide such a rule action. But, if you want to auto flag incoming emails with specific attachments, Outlook rule is unable to help you in that it does not offer a rule condition to check attachment. Hence, to realize it, you have to combine rule with a bit of scripting. Here, in the followings, we will teach you to get it step by step.
Auto Flag Incoming Emails with Specific Attachments
- For a start, in Outlook, press “Alt + F11” key buttons.
- Then, in the new window, put the following VBA code into a module.
Sub FlagEmail_SpecificAttachments(objMail As Outlook.MailItem) Dim objAttachment As Outlook.Attachment If objMail.Attachments.Count > 0 Then For Each objAttachment In objMail.Attachments 'Check if the email contains specific attachment 'You can change the criteria as per your needs Select Case Right(LCase(objAttachment.FileName), 4) 'Check attachment file type Case ".xls", "xlsx" 'Check attachment file name If InStr(objAttachment.FileName, "Report") > 0 Then 'Flag the email due to Tomorrow With objMail .MarkAsTask olMarkTomorrow .ReminderSet = True .ReminderTime = Now + 1 .Save End With End If End Select Exit For Next End If End Sub
- Subsequently, exit the VBA editor.
- After that, go to “File” menu and click “Manage Rules & Alerts” button.
- Next, in the popup dialog box, click “New Rule”.
- Later, in “Rules Wizard” dialog box, select “Apply rule on messages I receive” and click “Next”.
- In the new screen, select conditions as per your needs and hit “Next”.
- Afterwards, in “Select actions”, choose “Run a script”.
- Then, select the “FlagEmail_SpecificAttachments” script.
- Next, just follow the onscreen instructions to complete the rule setup.
- After creating such a rule successfully, from now on, every time when a new email with specific attachment attached arrives in your mailbox, Outlook will auto flag this email for follow-up, as shown in the following figure.
Deal with Outlook Damage
Among all kinds of Outlook issues, undoubtedly, Outlook corruption is the most terrible one. It is because that when encountering it, you have to repair damaged Outlook file to your utmost. However, as we all know, it is indeed an arduous task. Maybe you will firstly try the inbox repair tool. Yet, in honesty, most of time, it’ll not make effects in such cases. Thereby, your last resort is to resort to a powerful and trustworthy external tool, such as DataNumen Outlook Repair.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including damaged mdf and outlook repair software products. For more information visit www.datanumen.com