A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Accessing folder 'Other Contacts'



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 6th 10, 01:58 PM posted to microsoft.public.outlook.program_vba
Rudy
external usenet poster
 
Posts: 10
Default Accessing folder 'Other Contacts'

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).Fol ders(1)
Set myAddressLists = MyNameSpace.AddressLists("DE DAUW")

Debug.Print
Debug.Print "MyfolderPath:" & myNewFolder.FolderPath
Debug.Print "Myfolder:" & MyFolder.Name, "MyNewFolder:" & myNewFolder.Name
Ads
  #2  
Old May 6th 10, 07:51 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Accessing folder 'Other Contacts'

Look at the Namespace.GetSharedDefaultFolder method.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rudy" wrote in message
...
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).Fol ders(1)
Set myAddressLists = MyNameSpace.AddressLists("DE DAUW")

Debug.Print
Debug.Print "MyfolderPath:" & myNewFolder.FolderPath
Debug.Print "Myfolder:" & MyFolder.Name, "MyNewFolder:" &
myNewFolder.Name



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing .pst folder in outlook using VBA Code Abhijat Outlook and VBA 4 October 14th 09 05:10 PM
Error accessing Outlook folder John[_11_] Outlook and VBA 1 December 27th 08 03:25 PM
Error: Unable to display the folder. The Inbox folder cannot be found. - when accessing someone else's mailbox and having the proper rights Spin[_2_] Outlook - General Queries 2 December 19th 08 12:13 AM
help accessing main store folder brucegooglegroups Outlook Express 9 June 8th 07 04:24 AM
Accessing file folder doughboy Outlook - Installation 0 January 25th 06 11:03 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.