Changing Folder Properies

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I write a Macro that:

-Finds a folder in an Outlook data file other than the default
-Changes that Folder's Property to "show as an Outlook Address Book"
-Have this run everytime Outlook is Opened

I am not much of programmer, so any help would be appreciated.
 
Martin said:
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

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I appreciate your response, Sue. Again, I am not much of a coder, so I tried
to use the code. I put the function in, and then created a Sub rountine to
pass the folder name to it. I never could get it to work....unless I passed
to it GetFolder(3) for example...then it brought back the folder. On top of
that, I never could get the syntax write to simple change the setting....I
did see the property though. FInally, I do need it to right everytime. I
am pushing down a PST file locally and on changes it pushes a new copy...thus
overwriting the setting.
You may say, "why don't you just populate the contact list with
code.....well...I can't even get this simple code right!!!!

Thanks for your help!
 
We could probably help you sort that out if you'd post the code you're using.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top