All public folders directory

  • Thread starter Thread starter Linda
  • Start date Start date
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
 
You should always have a public folders Favorites folder and the public
folders hierarchy should always start at Public Folders and then All Public
Folders with any user created folders under All Public Folders. That's the
way Outlook/Exchange work with public folders.
 
Back
Top