PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
All public folders directory
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
All public folders directory
![]() |
All public folders directory |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

