I'm using Outlook 365, W10, not using Exchange. For below, it uses the the default contacts folder (using the name of my form) to change the message class in the defaults contact folder.
How can I update this to select a different contacts folder that is not the default contacts folder to update the message class.
Sub ChangeMessageClass()
Set olNS = Application.GetNamespace("MAPI")
Set ContactsFolder = olNS.GetDefaultFolder(olFolderContacts)
Set ContactItems = ContactsFolder.Items
For Each itm In ContactItems
If itm.MessageClass = "IPM.Contact" Then
itm.MessageClass = "IPM.Contact.Good News Contact"
itm.Save
End If
Next
End Sub
Thank you
Shawn
How can I update this to select a different contacts folder that is not the default contacts folder to update the message class.
Sub ChangeMessageClass()
Set olNS = Application.GetNamespace("MAPI")
Set ContactsFolder = olNS.GetDefaultFolder(olFolderContacts)
Set ContactItems = ContactsFolder.Items
For Each itm In ContactItems
If itm.MessageClass = "IPM.Contact" Then
itm.MessageClass = "IPM.Contact.Good News Contact"
itm.Save
End If
Next
End Sub
Thank you
Shawn