Question about message options

Status
Not open for further replies.

rerun101

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Hello all!

I was wondering if there was a way to create a macro to change the text in this field in the "Message Options" popup window. I would have an assortment of different Action phrases. I use this primarily for email task management and their next actionable items.. Seeing as the field is not really used for anything else..

upload_2016-6-30_15-16-48.png


Any assistance would be appreciated

Thanks
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
that is the contactnames field and it is writable using vba.

This will create a task using the currently selected message and set that field.

Code:
Sub CreateTask()
  Dim objMsg As MailItem
Dim objTask As TaskItem

Set objMsg = Application.ActiveExplorer().Selection(1)

Set objTask = Application.CreateItem(olTaskItem)
With objTask
  .Subject = objMsg.Subject
.Body = objMsg.Body
   .ContactNames = "@smith"
  .Display
End With
 
End Sub
 

rerun101

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Hi Diane!

Thanks for the quick response, I don't use the traditional tasks within Outlook. The macro works beautifully as it did add the @smith to the Contact names field but it did create a task. I would just need the macro to change the Contact names field of a message and not change it to a task.. But that was pretty cool

Thank you for your quick response
 

rerun101

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
Probably should paraphrase better, is it possible to just change the message options of an email message and not convert it to a task?
 

rerun101

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Office 365 Exchange
that is the contactnames field and it is writable using vba.

This will create a task using the currently selected message and set that field.

Code:
Sub CreateTask()
  Dim objMsg As MailItem
Dim objTask As TaskItem

Set objMsg = Application.ActiveExplorer().Selection(1)

Set objTask = Application.CreateItem(olTaskItem)
With objTask
  .Subject = objMsg.Subject
.Body = objMsg.Body
   .ContactNames = "@smith"
  .Display
End With

End Sub
is it possible to just change the message options of an email message and not convert it to a task?
 
Status
Not open for further replies.
Top