View Single Post
  #2  
Old August 17th 06, 10:34 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Changing Folder Properies

"Martin" wrote in message news
How can I write a Macro that:

-Finds a folder in an Outlook data file other than the default


To get a non-default folder, you need to walk the folder hierarchy using the Folders collections or use a function that does that for you. See http://www.outlookcode.com/d/code/getfolder.htm and, especially for public folders, http://www.outlookcode.com/codedetail.aspx?id=1164

-Changes that Folder's Property to "show as an Outlook Address Book"


The object browser (F2 in VBA) is your friend. If you used it, it wouldn't take you long to find the MAPIFolder.ShowAsOutlookAB property. You code needs to set it to True.

-Have this run everytime Outlook is Opened


Not necessary. You only need to set a folder's ShowAsOutlookAB property once.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

Ads