L
Linda
I recently modified the default contact form to
accomidate some user-defined fields. I published the form
and changed the existing public folder with a macro. My
problem is it created two subdirectories that I didn't
previously have. My contacts were a file of 'Public
Folders'. Now I have subdirectories called 'Favorites'
and 'All Public Folders' under 'Public Folders'.
Everything works fine and I know this is rather picky but
I would like to clean it up if possible.
I used the following macro:
Sub ChangeMessageClass()
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set allContactsFolder = olNS.GetDefaultFolder
(olPublicFoldersAllPublicFolders)
Set MyFolder = allContactsFolder.Folders("AEW Contacts")
Set ContactItems = MyFolder.Items
For Each Itm In ContactItems
If Itm.MessageClass <> "IPM.Contact.AEW Contact" Then
Itm.MessageClass = "IPM.Contact.AEW Contact"
Itm.Save
End If
Next
End Sub
Thank you very much in advance.
Linda
accomidate some user-defined fields. I published the form
and changed the existing public folder with a macro. My
problem is it created two subdirectories that I didn't
previously have. My contacts were a file of 'Public
Folders'. Now I have subdirectories called 'Favorites'
and 'All Public Folders' under 'Public Folders'.
Everything works fine and I know this is rather picky but
I would like to clean it up if possible.
I used the following macro:
Sub ChangeMessageClass()
Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set allContactsFolder = olNS.GetDefaultFolder
(olPublicFoldersAllPublicFolders)
Set MyFolder = allContactsFolder.Folders("AEW Contacts")
Set ContactItems = MyFolder.Items
For Each Itm In ContactItems
If Itm.MessageClass <> "IPM.Contact.AEW Contact" Then
Itm.MessageClass = "IPM.Contact.AEW Contact"
Itm.Save
End If
Next
End Sub
Thank you very much in advance.
Linda