PC Review


Reply
Thread Tools Rate Thread

Accessing folder 'Other Contacts'

 
 
Rudy
Guest
Posts: n/a
 
      6th May 2010
I am programming in VBA

Several users are using Outlook in a network environment. Each of them hat
its own 'Contacts'. They have shared their addresslists so that I can lookup
en change the contacts fields from my workstation.

I would like to access these Contactlists by using VBA. Therefor, i found
via the help function some code and tried to open the contact of a user
called 'DE DAUW' and whose contacts I can see in the 'Other Contacts'.
Impossible to get into the 'DE DAUW' addresslist.

Who can help me ?

Dim MyApp As Outlook.Application
Dim MyNameSpace As Outlook.Namespace
Dim MyFolder As Outlook.MAPIFolder
Dim MyItemsCollection As Object
Dim myItem As Object
Dim MyMatchingItem As Object
Dim myNewFolder As Outlook.MAPIFolder
Dim myAddressLists As AddressLists
Dim myAddressList As AddressList

Set MyApp = CreateObject("Outlook.Application")
Set MyNameSpace = MyApp.GetNamespace("MAPI")
MyNameSpace.Logon

Set MyFolder = MyNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder =
MyNameSpace.GetDefaultFolder(olFolderContacts).Folders(1)
Set myAddressLists = MyNameSpace.AddressLists("DE DAUW")

Debug.Print
Debug.Print "MyfolderPath:" & myNewFolder.FolderPath
Debug.Print "Myfolder:" & MyFolder.Name, "MyNewFolder:" & myNewFolder.Name
 
Reply With Quote
 
 
 
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      6th May 2010
Look at the Namespace.GetSharedDefaultFolder method.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rudy" <(E-Mail Removed)> wrote in message
news:8AED479E-22F6-44A3-A695-(E-Mail Removed)...
>I am programming in VBA
>
> Several users are using Outlook in a network environment. Each of them hat
> its own 'Contacts'. They have shared their addresslists so that I can
> lookup
> en change the contacts fields from my workstation.
>
> I would like to access these Contactlists by using VBA. Therefor, i found
> via the help function some code and tried to open the contact of a user
> called 'DE DAUW' and whose contacts I can see in the 'Other Contacts'.
> Impossible to get into the 'DE DAUW' addresslist.
>
> Who can help me ?
>
> Dim MyApp As Outlook.Application
> Dim MyNameSpace As Outlook.Namespace
> Dim MyFolder As Outlook.MAPIFolder
> Dim MyItemsCollection As Object
> Dim myItem As Object
> Dim MyMatchingItem As Object
> Dim myNewFolder As Outlook.MAPIFolder
> Dim myAddressLists As AddressLists
> Dim myAddressList As AddressList
>
> Set MyApp = CreateObject("Outlook.Application")
> Set MyNameSpace = MyApp.GetNamespace("MAPI")
> MyNameSpace.Logon
>
> Set MyFolder = MyNameSpace.GetDefaultFolder(olFolderContacts)
> Set myNewFolder =
> MyNameSpace.GetDefaultFolder(olFolderContacts).Folders(1)
> Set myAddressLists = MyNameSpace.AddressLists("DE DAUW")
>
> Debug.Print
> Debug.Print "MyfolderPath:" & myNewFolder.FolderPath
> Debug.Print "Myfolder:" & MyFolder.Name, "MyNewFolder:" &
> myNewFolder.Name



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Profiles Accessing One Contacts Folder =?Utf-8?B?TVdF?= Microsoft Outlook Contacts 2 28th Aug 2005 06:07 PM
Problem accessing the Contacts folder R Microsoft Outlook 2 7th Jun 2005 08:42 PM
Re: Problem accessing contacts folder Russ Valentine [MVP-Outlook] Microsoft Outlook Contacts 0 24th Apr 2004 04:48 PM
Error accessing OL 2003 Contacts Folder Bob S Microsoft Outlook 0 11th Feb 2004 05:46 PM
Accessing public folder contacts in OL2003 Doug Microsoft Outlook Contacts 2 30th Jan 2004 02:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:23 PM.