I am using the following code to change my Message Class in the current folder. It works, but some of my older contacts the Message Class does not change. There is no error, or message, it just doesn't update. These are probably contacts I created many years ago in older versions of Outlook. One thing that is the same about them is I cannot use the reading pane. Outlook notes the item contains active content that I have never been able to resolve. New contacts I create do not have the same issue.
Any suggestions would be greatly appreciated.
Sub ChangeMessageClass()
Set olNS = Application.GetNamespace("MAPI")
Set ContactsFolder = Application.ActiveExplorer.CurrentFolder.Items
Set ContactItems = ContactsFolder
For Each Itm In ContactItems
If Itm.MessageClass = "IPM.Contact" Then
Itm.MessageClass = "IPM.Contact.SRM"
Itm.Save
End If
Next
End Sub
Shawn
Any suggestions would be greatly appreciated.
Sub ChangeMessageClass()
Set olNS = Application.GetNamespace("MAPI")
Set ContactsFolder = Application.ActiveExplorer.CurrentFolder.Items
Set ContactItems = ContactsFolder
For Each Itm In ContactItems
If Itm.MessageClass = "IPM.Contact" Then
Itm.MessageClass = "IPM.Contact.SRM"
Itm.Save
End If
Next
End Sub
Shawn