Outlook - Retrieve contact folder details from additional mailbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I am trying to extract all the contact details from outlook but not on my
default mailbox. I have an additional mailbox named "Route Planning HD".
My code works fine for my default mailbox so the problem isnt there its just
directing access to look in a different place that i'm having the problem
with.

I am using the following to direct access to the default folder:

Set olMAPI = OutlookNS.GetDefaultFolder(olFolderContacts)

And i "think" i need to be using the following to direct it to an additional:

Set olMAPI = OutlookNS.GetSharedDefaultFolder("Route Planning HD",
olFolderContacts)

Anyone have any ideas why the second line doesnt work or how to make it
work? I guess the answer is to set "Route Planning HD" as a recipient object
but i dont seem to be able to get this to work correctly.

Kind regards & Thanks,
-Dave-
 
Hi Again all!

Ok i have finally manage to get the .GetSharedDefaultFolder to work
correct by setting the first variable as a recipient. as i stated below.

My problem now is that it says it cant find the contacts folder. I know it
is pointed in the right direct as i have tried changing it to olmailitem and
deleting all my mail and it finds nothing, then putting mail in that mailbox
and it finds it.
So with that all said i know its looking at the right place but just cant
find the contact folder. There is no naming issues as it is simply called
Contacts as standard.

Any advice would be great!
Thanks,
Dave
 
Back
Top