Solved

GetDefaultFolder question

Posted on 1998-07-08
7
310 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
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
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…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

820 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