Solved

GetDefaultFolder question

Posted on 1998-07-08
7
315 Views
Last Modified: 2008-02-01
I want to add contacts from my Access database to an Outlook Contacts folder.  I know how to send the data - but how do I tell the program which of several Contacts folders I want to send the data to.  Is there a GetSpecificFolder type function or similar??
0
Comment
Question by:piggles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 7

Expert Comment

by:BlackMan
ID: 1621074
I think you have to do something like this: (Not tested, kind of pseudocode)

Set MyContacts = olns.GetDefaultFolder(olContacts)
For I = 0 MyContacts.Count - 1
  Print MyContacts.Items(I)

0
 

Author Comment

by:piggles
ID: 1621075
Hi BlackMan - thanks for the reply.  I think you are probably on the right track, but I have tried your pseudocode and several variations on it and I keep getting range errors.
0
 

Expert Comment

by:aIce
ID: 1621076
Do you want use a public ora private store?
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:piggles
ID: 1621077
Hi Alce - Thanks for replying. I need to access a folder within "All Public Folders"
0
 

Accepted Solution

by:
aIce earned 50 total points
ID: 1621078
Give the following URL a shot
http://support.microsoft.com/support/kb/articles/q180/6/96.asp

Here is a bit of sample code that may answer you question

Set pubFolder = New Outlook.Application.GetNameSpace("MAPI").Folders("Public Folders")
 
  Set specificFolder = pubFolder.Folders("My Public Contacts")

I hope this helps
 
0
 

Expert Comment

by:aIce
ID: 1621079
BTW I meant to say:
Here is a bit of sample code that may answer "your" question.
Sorry about that
0
 

Author Comment

by:piggles
ID: 1621080
Hi Alce thanks for the answer.  I appreciate your help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question