Solved

GetDefaultFolder question

Posted on 1998-07-08
7
285 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now