Accessing folder 'Other Contacts'

  • Thread starter Thread starter Rudy
  • Start date Start date
Status
Not open for further replies.
R

Rudy

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
 
Look at the Namespace.GetSharedDefaultFolder method.

Dmitry Streblechenko (MVP)

-

"Rudy" <Rudy> wrote in message

news:8AED479E-22F6-44A3-A695-77107E1DA0CC@microsoft.com...
> 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
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
E Accessing shared outlook folder doesn't work since switch to new outlook/excel Outlook VBA and Custom Forms 11
C Problem accessing events for folder "username" Server Threw Exception Using Outlook 1
A "Unable to display the folder" error when accessing Group mailbox Using Outlook 0
A Accessing .pst folder in outlook using VBA Code Outlook VBA and Custom Forms 4
A Accessing full contact forms Using Outlook 2
S Problem Accessing .MSG Property 'ImageNaturalHeight' Tag '0x80010003' Outlook VBA and Custom Forms 1
M Accessing ALL Outlook contact fields Outlook VBA and Custom Forms 3
RBLampert Accessing Outlook accounts from multiple computers Using Outlook 8
J Accessing calendar items for Resource Mailboxes Outlook VBA and Custom Forms 2
S Outlook [Online - Office365] perfomance is getting affected when accessing the mails using Redemptio Using Outlook 1
J Accessing Hotmail accounts with Outlook 2016 Using Outlook 3
n2b Accessing Plain Text Draft Without Outlook Using Outlook 3
G Issues with accessing Outlook Contact Picture with VBA Outlook VBA and Custom Forms 4
M Accessing ExpiryTime property Outlook VBA and Custom Forms 1
M Accessing BCM with Excel / Running Reports BCM (Business Contact Manager) 1
P accessing custom task pane with Outlook ActiveInspector Using Outlook 1
mikecox Accessing Outlook on my Win7 desktop from Win8 laptop Using Outlook 1
Commodore Accessing mail from multiple devices Using Outlook 1
S Programmatically accessing Outlook Calendar data Using Outlook 1
E Accessing User Defined Fields in BCM Database part 2 BCM (Business Contact Manager) 0
E [SOLVED] Accessing User Defined Fields in BCM Database part 1 BCM (Business Contact Manager) 9
E Accessing a Form Region from an Inspector Outlook VBA and Custom Forms 3
E Accessing a Form Region from an Inspector Outlook VBA and Custom Forms 3
D Accessing Global Address List details with VBA Outlook VBA and Custom Forms 1
H Accessing a control on a frame in Outlook with VBScript Outlook VBA and Custom Forms 1
K Programmatically accessing Outlook properties Outlook VBA and Custom Forms 3
K assistant accessing from her home computer BCM (Business Contact Manager) 2
J Outlook closes when accessing History in BCM BCM (Business Contact Manager) 4
B Accessing Outlook 2003 Signature Programmatically using C# Outlook VBA and Custom Forms 6
L Outlook Forms-Accessing Outlook VBA and Custom Forms 1
C Accessing _RecipientControl1 (Assigned To) Outlook VBA and Custom Forms 2
K Accessing contact's custom properties in a Outlook 2007 form region Outlook VBA and Custom Forms 1
V Outlook custom form - installing and accessing Outlook VBA and Custom Forms 1
A Daily hours of recurring/ multi-day appts, & accessing mult calend Outlook VBA and Custom Forms 2
R New users creating get page cannot be displayed when accessing OWA Exchange Server Administration 16
A OL24 Calendar folder pane too narrow Using Outlook 9
E "Cannot display the folder. MS Outlook cannot access the specified file location" Using Outlook 8
S How to get the actual Public Folder path from Favourites Folders Outlook VBA and Custom Forms 3
D.Moore Outlook COM addins source folder Using Outlook 12
M Folder names - rich text Using Outlook 6
E Gmail folder -why, in .ost IMAP situation, as well as Googlemail folder? Using Outlook 0
J Saving Send emails to a folder on the server Outlook VBA and Custom Forms 63
J Outlook 2019 Pick the Folder Location to save send emails Outlook VBA and Custom Forms 0
macdotcom Outlook 365 Outlook folder export to PST archival tool - close, but need a nudge Outlook VBA and Custom Forms 2
B How to get PST folder datetime? Outlook VBA and Custom Forms 1
M Search message, then (1) Jump to folder & (2) Select message that you searched for Outlook VBA and Custom Forms 6
G Search Folders and Jump to Folder Outlook VBA and Custom Forms 2
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
P Can't add custom field to custom Outlook form, it always adds to the Folder instead Outlook VBA and Custom Forms 2
P Yahoo/IMAP folder rename by Outlook desktop 365 Using Outlook 0

Similar threads

Back
Top