zHZDrCJdHWfr
Member
- Outlook version
- Outlook 2016 64 bit
- Email Account
- Office 365 Exchange
Working on improving my Outlook workflow this week. I've realized a point of friction is the quicksteps I've been using in Outlook offer me the ability to create a task and insert the text of the email into the task notes OR include the original email in the notes as an attachment / file; however, it does not allow you to do both. I've been searching for some code to solve this issue. I found the code below that Diane Poremsky wrote. I want to be able to run the code from an icon/button on the quick access toolbar. The way the code is written it doesn't allow me to do that, because to my understanding it is intended to be run via a rule in the background not user activated.
How can I change the code below to be user activated? Any help on the other steps would be appreciated also.
Sub ConvertMailtoTask(Item As Outlook.MailItem)
Dim objTask As Outlook.TaskItem
Set objTask = Application.CreateItem(olTaskItem)
objTask.Subject = Item.Subject
objTask.StartDate = Item.ReceivedTime
objTask.Body = Item.Body
objTask.Save
Set objTask = Nothing
End Sub
How can I change the code below to be user activated? Any help on the other steps would be appreciated also.
Sub ConvertMailtoTask(Item As Outlook.MailItem)
Dim objTask As Outlook.TaskItem
Set objTask = Application.CreateItem(olTaskItem)
objTask.Subject = Item.Subject
objTask.StartDate = Item.ReceivedTime
objTask.Body = Item.Body
objTask.Save
Set objTask = Nothing
End Sub