All public folders directory

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top