Home > other >  Outlook2016 by vba turn email task
Outlook2016 by vba turn email task

Time:09-20

My Outlook set up 2 mail to [email protected] and [email protected], A is set to the default mailbox,

The following code can be generated macro 1, then apply macro 1 B to a mailbox mail rules, each email is automatically generated email received a B a task,

Now every email B received an email to automatically generate A task, but the task of belonging in the mail A list of tasks,

I hope to email B through rules automatically generated task can belong in mail B task list, please directly, thank you!


Sub ConvertMailtoTask (Item As Outlook. MailItem)
Dim objTask As Outlook. TaskItem

The Set objTask=Application. The CreateItem (olTaskItem)

With objTask

. The Subject=Item. Subject

. The StartDate=Item. ReceivedTime

. The Body=Item. The Body

. Save

End With

The Set objTask=Nothing


End Sub
  • Related