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
Prev Previous Post   Next Post Next
  #1  
Old May 6th 10, 12: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
 




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 04:10 PM
Error accessing Outlook folder John[_11_] Outlook and VBA 1 December 27th 08 02: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 18th 08 11:13 PM
help accessing main store folder brucegooglegroups Outlook Express 9 June 8th 07 03:24 AM
Accessing file folder doughboy Outlook - Installation 0 January 25th 06 10:03 PM


All times are GMT +1. The time now is 06:27 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.