A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Changing Folder Properies



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 17th 06, 09:36 PM posted to microsoft.public.outlook.program_vba
Martin
external usenet poster
 
Posts: 87
Default Changing Folder Properies

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.
Ads
  #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

  #3  
Old August 25th 06, 10:58 PM posted to microsoft.public.outlook.program_vba
Martin
external usenet poster
 
Posts: 87
Default Changing Folder Properies

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.

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


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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing File As for all contacts in a folder John Outlook - Using Contacts 0 August 4th 06 11:11 PM
Changing Name of email Folder Colin Outlook and VBA 1 June 22nd 06 06:47 AM
Changing default views for all folder Cary Outlook - Installation 1 May 4th 06 10:09 PM
Changing Contact Info in One Folder - How to apply in other folder atbioteach Outlook - Using Contacts 1 February 3rd 06 01:27 AM
outlook permission/permissionservice properies Sue Mosher [MVP-Outlook] Outlook and VBA 0 February 1st 06 05:16 PM


All times are GMT +1. The time now is 07:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.