B
Boris Schwank
I just created a script to replace the existing contact form, with a
re-designed. Everything workes fine in the standard contact folder, but i
had more contact folders and the there happend nothing.
Can somebody help me?
This is the code I am using,
Sub ChangeMessageClass()
Set olapp = New Outlook.Application
Set olNS = olapp.GetNamespace("MAPI")
Set K1Folder = _ <--This is my Folder-
olNS.GetDefaultFolder(10)
Set ContactsFolder = _
olNS.GetDefaultFolder(10)
Set ContactItems = ContactsFolder.Items
For Each Itm In ContactItems
If Itm.MessageClass <> "IPM.Contact.test" Then
Itm.MessageClass = "IPM.Contact.test"
Itm.Save
End If
Next
Set K1FolderItems = K1Folder.Items
For Each Itm In K1Folder.Items
If Itm.MessageClass <> "IPM.Contact.test" Then
Itm.MessageClass = "IPM.Contact.test"
Itm.Save
End If
Next
End Sub
re-designed. Everything workes fine in the standard contact folder, but i
had more contact folders and the there happend nothing.
Can somebody help me?
This is the code I am using,
Sub ChangeMessageClass()
Set olapp = New Outlook.Application
Set olNS = olapp.GetNamespace("MAPI")
Set K1Folder = _ <--This is my Folder-
olNS.GetDefaultFolder(10)
Set ContactsFolder = _
olNS.GetDefaultFolder(10)
Set ContactItems = ContactsFolder.Items
For Each Itm In ContactItems
If Itm.MessageClass <> "IPM.Contact.test" Then
Itm.MessageClass = "IPM.Contact.test"
Itm.Save
End If
Next
Set K1FolderItems = K1Folder.Items
For Each Itm In K1Folder.Items
If Itm.MessageClass <> "IPM.Contact.test" Then
Itm.MessageClass = "IPM.Contact.test"
Itm.Save
End If
Next
End Sub