PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming All public folders directory

Reply

All public folders directory

 
Thread Tools Rate Thread
Old 08-09-2004, 05:19 PM   #1
Linda
Guest
 
Posts: n/a
Default All public folders directory


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
  Reply With Quote
Old 09-09-2004, 03:16 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: All public folders directory

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.

--
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


"Linda" <anonymous@discussions.microsoft.com> wrote in message
news:837601c495bf$96fea720$a501280a@phx.gbl...
> 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



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off