Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / September 2004

Tip: Looking for answers? Try searching our database.

All public folders directory

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Linda - 08 Sep 2004 17:19 GMT
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
Ken Slovak - [MVP - Outlook] - 09 Sep 2004 15:16 GMT
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.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> I recently modified the default contact form to
> accomidate some user-defined fields. I published the form
[quoted text clipped - 27 lines]
> Thank you very much in advance.
> Linda
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.