wayneame
New Member
- Outlook version
- Outlook 2016 64 bit
- Email Account
- IMAP
To change the form used by existing task items in a folder, I used this as reference and came up with the following code:
Sub ChangeMessageClass()
Set olNS = Application.GetNamespace("MAPI")
Set TasksFolder = _
olNS.GetDefaultFolder(olFolderTasks)
Set ContactItems = TasksFolder.Items
For Each Itm In TaskItems
If Itm.MessageClass <> "Task" Then
Itm.MessageClass = "Task"
Itm.Save
End If
Next
End Sub
Sub ChangeMessageClass()
Set olNS = Application.GetNamespace("MAPI")
Set TasksFolder = _
olNS.GetDefaultFolder(olFolderTasks)
Set ContactItems = TasksFolder.Items
For Each Itm In TaskItems
If Itm.MessageClass <> "Task" Then
Itm.MessageClass = "Task"
Itm.Save
End If
Next
End Sub