Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to auto create new tasks when receiving specified emails in Outlook?

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 and 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 the 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 mode, 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 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 message I receive option 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, and in the Step 2: Edit the rule description (click an underline value) section, click the people or public group link go to the Rule Address dialog box, then double click the email address which you want to auto create task while receiving . See screenshot:

7. Click OK, and go on clicking Next button, in the Step 1: Select action(s) list box, check run a script option, in Step 2: Edit the rule description (click an underline value) box, click on a script link. And a Select Script dialog box will show up, select the previously added macro and click OK.

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

9. Then click Finish button and click OK to close the Rules and Alerts dialog.

10. From now on, once you receive the emails that from the specific address, Outlook will create the corresponding tasks automatically. You can check these tasks in your task folder. See screenshot:

 

Recommended Productivity Tools

shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121

Kutools for Outlook - More than 100 Advanced Functions for Outlook, Improve 70% Efficiency For you

  • Complicated and repeated operations can be done a one-time processing in seconds.
  • Forward multiple emails individually with one-click, and auto forward by rules.
  • Auto CC/BCC every sending email and easy for customizing rules, and auto reply without requiring exchange server.
  • Powerful junk emails filter, remove duplicate emails, reply with attachment, bunch of one-click operations, and so on...
  • 60-day unlimited free trial. 60-day money back guarantee. 2 years free upgrade and support. Buy once, use forever.
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Sandra · 1 months ago
    Hola, me podríais decir por favor qué formato tiene que tener el email que se recibe?

    En realidad yo quiero transformar un email en una cita de calendario, pero una vez consiga ésto, intentaré lo otro.

    Gracias!!