In Outlook, it may be easy for us to create a new task from an email message. But, have you ever tried to create a new task automatically when receiving specified emails? For example, I just want to auto-create tasks from the messages of my boss. How could you deal with this job in Outlook?
Auto create new tasks when receiving specified emails with VBA code in Outlook
Auto create new tasks when receiving specified emails with VBA code in Outlook
There is no direct method or rule to solve this job, but here, I can combine the VBA code and rule together to finish it. Please do as follows:
1. Launch Outlook, and then hold down the "ALT + F11" keys to open the "Microsoft Visual Basic for Applications" window.
2. In the "Microsoft Visual Basic for Applications" window, double-click "ThisOutlookSession" from the "Project1 (VbaProject.OTM)" pane to open the code window, and then copy and paste the following code into the blank module.
VBA code: auto create new tasks when receiving emails:
Sub CreateNewTask(Item As Outlook.MailItem)
Dim xNewTask As TaskItem
On Error Resume Next
Set xNewTask = Outlook.CreateItem(olTaskItem)
With xNewTask
.Subject = Item.Subject
.StartDate = Item.ReceivedTime
.DueDate = Item.ReceivedTime + 1
.Body = Item.Body
.Importance = olImportanceHigh
.Save
End With
Set xNewTask = Nothing
End Sub

3. Then save and close the code. After inserting the code, you need to create a rule. Please click "Rules" > "Manage Rules & Alerts" under the "Home" tab. See screenshot:

4. In the "Rules and Alerts" dialog box, click "New Rule". See screenshot:

5. In the popped-out "Rules Wizard", select "Apply rule on messages I receive" from the "Start from a blank rule" section. See screenshot:

6. Click "Next" button. In the "Step 1: Select condition(s)" list box, choose the condition you want to create. In this example, I will check "from people or public group" option. Then in "Step 2: Edit the rule description (click an underlined value)" section, click the "people or public group" link to open the "Rule Address" dialog box, and double-click the email address from which you want to auto-create tasks. See screenshot:

7. Click "OK", and then continue by clicking "Next". In the "Step 1: Select action(s)" list box, check "run a script". Then in "Step 2: Edit the rule description (click an underlined value)" section, click on the "a script" link. A "Select Script" dialog box will pop up; select the previously added macro and click "OK".

8. Then click "Next" > "Next" to go to the "Finish" rule setup screen. Give a rule name into the "Step 1: Specify a name for this rule" text box, and then check "Turn on this rule" in the "Step 2: Setup rule options" section. See screenshot:

9. Then click "Finish" button and "OK" to close the "Rules and Alerts" dialog box.
10. From now on, once you receive emails from the specific address, Outlook will create corresponding tasks automatically. You can check these tasks in your Task folder. See screenshot:

Best Office Productivity Tools
Breaking News: Kutools for Outlook Launches Free Version!
Experience the all-new Kutools for Outlook with 100+ incredible features! Click to download now!
π€ Kutools AI : Uses advanced AI technology to handle emails effortlessly, including replying, summarizing, optimizing, extending, translating, and composing emails.
π§ Email Automation: Auto Reply (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
π¨ Email Management: Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
π Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
π Interface Magic: πMore Pretty and Cool Emojis / Remind you when important emails come / Minimize Outlook Instead of Closing ...
π One-click Wonders: Reply All with Attachments / Anti-Phishing Emails / πShow Sender's Time Zone ...
π©πΌβπ€βπ©π» Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Use Kutools in your preferred language β supports English, Spanish, German, French, Chinese, and 40+ others!


π One-Click Download β Get All Office Add-ins
Strongly Recommended: Kutools for Office (5-in-1)
One click to download five installers at once β Kutools for Excel, Outlook, Word, PowerPoint and Office Tab Pro. Click to download now!
- β One-click convenience: Download all five setup packages in a single action.
- π Ready for any Office task: Install the add-ins you need, when you need them.
- π§° Included: Kutools for Excel / Kutools for Outlook / Kutools for Word / Office Tab Pro / Kutools for PowerPoint