View Single Post
  #4  
Old September 7th 06, 02:57 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Changing Folder Properies

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Martin" wrote in message ...
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!

"Sue Mosher [MVP-Outlook]" wrote:

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



Ads