Solved

GetDefaultFolder question

Posted on 1998-07-08
7
319 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

627 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