¿Cómo crear automáticamente nuevas tareas al recibir correos electrónicos específicos en Outlook?
En Outlook, puede ser fácil para nosotros crear una nueva tarea a partir de un mensaje de correo electrónico. Pero, ¿alguna vez ha intentado crear una nueva tarea automáticamente al recibir correos electrónicos específicos? Por ejemplo, solo quiero crear tareas automáticamente a partir de los mensajes de mi jefe. ¿Cómo podría lidiar con este trabajo en Outlook?
Cree automáticamente nuevas tareas al recibir correos electrónicos específicos con código VBA en Outlook
No existe un método directo y una regla para resolver este trabajo, pero aquí puedo combinar el código VBA y la regla para terminarlo, haga lo siguiente:
1. Inicie Outlook y luego mantenga presionado el ALT + F11 teclas para abrir el Microsoft Visual Basic para aplicaciones ventana.
2. En la Microsoft Visual Basic para aplicaciones ventana, haga doble clic Esta sesión de Outlook del desplegable Proyecto1 (VbaProject.OTM) panel para abrir el modo y luego copie y pegue el siguiente código en el módulo en blanco.
Código VBA: crea automáticamente nuevas tareas al recibir correos electrónicos:
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:
Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!
- Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
- BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
- Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
- Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
- Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
