简体   繁体   中英

To get GAL of non default address book from multiple accounts in outlook

I have two domain accounts configured in my outlook, for example xxx@domain1.com and yyy@domain2.com.

There are 2 address books (Please refer to the picture attached). I want to show user to SelectNameDialog by adding the recipients from non-default account's address book. But it adds the names to the selectnamedialog from the default address book and displays.

C# code :

Outlook.SelectNamesDialog snd = app.Session.GetSelectNamesDialog();![AddressBook Select name dialog][1]

How to get non-default account's address book programmatically.

1 : 通讯录SelectNameDialog

Make sure Outlook automatically selects the relevant address book based om the currently active store (Ctrl + Shift + B to show the address book, Tools | Options | "When Opening the address book, show this address list first", make sure "Choose automatically" is selected).

Programmatically, use the SelectNamesDialog object and its InitialAddressList property.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM