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

I have two domain accounts configured in my outlook, for example [email protected] and [email protected]
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();
How to get non-default account’s address book programmatically.
ThankYou for your suggestion.
Note: I am not able to attach the image

Hello,
> Note: I am not able to attach the image
It seems you need to verify your account. See How
to Verify Your MSDN/TechNet Forums Account So that You Can Post Images and Links.
> How
to get non-default account’s address book programmatically.
void DisplayGlobalAddressListForStore()
Outlook.Folder currentFolder =
Application.ActiveExplorer().CurrentFolder
as Outlook.Folder;
Outlook.Store currentStore = currentFolder.Store;
if (currentStore.ExchangeStoreType !=
Outlook.OlExchangeStoreType.olNotExchange)
Outlook.SelectNamesDialog snd =
Application.Session.GetSelectNamesDialog();
Outlook.AddressList addrList =
GetGlobalAddressList(currentStore);
if (addrList != null)
snd.InitialAddressList = addrList;
snd.Display();
public Outlook.AddressList GetGlobalAddressList(Outlook.Store store)
string PR_EMSMDB_SECTION_UID =
@"http://schemas.microsoft.com/mapi/proptag/0x3D150102";
if (store == null)
throw new ArgumentNullException();
Outlook.PropertyAccessor oPAStore = store.PropertyAccessor;
string storeUID = oPAStore.BinaryToString(
oPAStore.GetProperty(PR_EMSMDB_SECTION_UID));
foreach (Outlook.AddressList addrList
in Application.Session.AddressLists)
Outlook.PropertyAccessor oPAAddrList =
addrList.PropertyAccessor;
string addrListUID = oPAAddrList.BinaryToString(
oPAAddrList.GetProperty(PR_EMSMDB_SECTION_UID));
// Return addrList if match on storeUID
// and type is olExchangeGlobalAddressList.
if (addrListUID == storeUID && addrList.AddressListType ==
Outlook.OlAddressListType.olExchangeGlobalAddressList)
return addrList;
return null;
Setting the InitialAddressList property is the programmatic equivalent to selecting an AddressList from the drop-down list for Address Book in
the Select Names dialog box.
In its default state, InitialAddressList is the AddressList that has the property AddressList.IsInitialAddressList set
to True. IsInitialAddressList corresponds to setting Show this address list first in the Addressing dialog
box, which is available by clicking Tools, and then Options in the Address
Book dialog box.
See How to: Get the Global Address List or a Set of Address Lists for a Store for more information.

Similar Messages

  • My wife has iCloud on our computer and I want to break out and create my own account. Once I build the account how do I copy the address book from her account into mine?

    my wife has icloud on our computer and I want to break out and create my own icloud account. I've built the account but can't figure out how to COPY our joint address book onto my account so I can then weed out my own addresses. Please help!

    Welcome to the Apple Community.
    When you log out of the joint account, you should be asked if you want to keep the contacts, you do. When you log into your new account you should be asked if you want to merge contacts, you do.
    If you have already signed into your new account and not taken these options, the simplest thing to do might be to add your wife's account back as a secondary account in system preferences > mail, contacts & calendars. In groups in address book you can drag contacts from your wife's contacts onto your contact group to copy them.

  • How do I change the default address book from the Personal Address Book?

    Whenever I click on an email address from within an email and ask to add it to my address book, the contact is added to Personal Address Book. How do I change that so that new addresses will be added to another book?

    I do not know of a way to change the default but after you click the star beside the address to add it to the address book, click the star a second time to open the edit dialog box. There is a drop down list of your address books to make the change there.

  • Address Book from Gmail Account

    How can I download address book direct from my Gmail Account instead of importing it as CSV file?

    It's possible to synchronize Gmail contacts in TB:
    https://addons.mozilla.org/en-us/thunderbird/addon/google-contacts/
    http://chrisramsden.vfast.co.uk/3_How_to_install_Add-ons_in_Thunderbird.html

  • ICloud destroys default address book.

    Using iCloud for Outlook 2010 on Multiple W7Pro PC's and also have multiple MACs using Lion.  Outlook sync on the PC destroys all entries to the Default Address Book and writes them to the iCloud Address Book making all tasks and Calendar entries not visible on the Outlook Home page.  The problem is that the Default Address Book is still there and empty and many addins that use Outlook want to see addresses in the Default Address Book.  New contacts end up in the Default Address Book and then get synced to iCloud.  However, changes to the iCloud calendar in Outlook only sync to iCal on other Apple machines, not to other PC's with iCloud and Outlook sync turned on.
    There are lots of us loyal Apple enthusiasts who still have to live in a PC World at the office.  Apple doesn't have any help on this subject and has just thumbed their nose at customers like us.  They sure should pop up a warning on the perils of Outlook sync.
    Any help is appreciated.

    That is standard Outlook behaviour with subscription accounts, such as iCloud. There is no workaround unless you dump Outlook, or iCloud. I would dump Outlook, it's awful unless you have an Exchange account.

  • I am having trouble trying to get my address book from my mac (just downloaded Lion for this purpose) to my 3G ipad. Set up an icloud account but still confused! Please help !

    I updated my mac with  os x Lion so that I could accomplish moving my address book from the mac to my new IPad 3G. I also set up an icloud account for this purpose, but I *still* cannot figure out how to move my address book from one computer to the other. When I'm on my mac and try to use bluetooth to export the address book, I'm able to find my ipad but I soon get a message that it does not support the necessary services. I have no idea what's going on and would appreciate any advice. tks in advance, Sarah

    blacksheepfibers wrote:
    I updated my mac with  os x Lion so that I could accomplish moving my address book from the mac to my new IPad 3G. I also set up an icloud account for this purpose, but I *still* cannot figure out how to move my address book from one computer to the other. When I'm on my mac and try to use bluetooth to export the address book, I'm able to find my ipad but I soon get a message that it does not support the necessary services. I have no idea what's going on and would appreciate any advice. tks in advance, Sarah
    The address book syncs via iCloud, not Bluetooth or iTunes.
    You upgraded to Lion so you could use iCoud.
    On the computer. go to Apple menu > System prefs > iCloud.
    Sign into your iCloud account.
    Tick everything.
    This enalbes the se items syncing to iCloud.
    On the iPad, Settings > Mail, Contacts, Calendars.
    Create a new iCloud account.
    Sign in with the same AppleID as your computer.
    Settings > iCloud and turn everything on.
    BAM!
    That is all you need to do.
    Your contacts (and all other checked items checked) will sync between computer and iPad.
    No need to use iTunes

  • Setting Exchange as default address book

    I use only Exchange to store my email, contacts, and calendar data. Unfortunately, Address Book insists on also having it's "On My Mac" folder/account, which I can't seem to delete. I wouldn't care except that whenever I create a new contact (or "Add to Address Book" from within Mail), it automatically creates the contact within On My Mac, and not within my Exchange account where I keep all my contacts. It's a bit annoying having to go in and manually move the contact from On My Computer to my Exchange account.
    Is there any way to set a "default" account within Address Book such that I can have it automatically use the Exchange one?
    Dan

    Problem solved:
    Open Address Book
    Hit Cmd+; or click Address Book \ Preferences
    Click Accounts on the toolbar
    Under the "On My Mac" account, change the setting for "Default account for new contacts".
    That's it! So glad this setting is in here. A bit hard to find (I just stumbled upon it a few moments ago), but at least it's there.

  • I have lost the email Address Book from the menu bar. How do I get it back?

    I have lost the address book from the menu bar. How do I get it back?

    Which menu bar?  Finder or your email client?  Which email client are you using btw?  If your email client you can customize your menu through the view>toolbars menu.
    If Mail it's view>Customize Toolbar 
    Finder menu it's System Preferences>Users & Groups>your account>unlock the padlock>Login Items - add the address book by clicking the "+" sign.  When done lock the padlock. 

  • Default address book

    How can I make address book of my gmail account as default?
    Secondly if I want to add email address of any downloaded emails or incoming emails then by default they add it to my default address book of my gmail account.

    You can't change the default address book, but if you use the Contacts sidebar (F9 in a Write window), you can select which address book appears when the sidebar is visible.
    When you click the yellow start next to a sender's address in the Message Header to add it to an address book, the first click stores it in Personal Address Book, but if you click the star again, it's possible to select the address book from the drop-down list.

  • When I try to open my Address Book from Finder, it says :You can't use this version with this version of Mac OS x. I have Address Book 5.0.3 and Mac OS X 10.7.5 What should I do to get my Address Book back???

    When I try to open my Address Book from Finder, it says :You can't use this version with this version of Mac OS x. I have Address Book 5.0.3 and Mac OS X 10.7.5 What should I do to get my Address Book back???

    Unless you deleted Address Book 6, or restored from a backup made before you upgraded to Lion, Address Book 6 should be on your disk somewhere.  Try to find it with spotlight or by browsing likely folders with Finder.  Also check Trash. If you find other Address Books, using Quick View or Get Info in Finder should show the version number.
    Have you ever moved Address Book out of the Applications folder, either before or after you upgraded to Lion?
    If you can't figure out how this happened in the first place, I would be worried that other OS X utilities are similarly affected.

  • Apple store wiped HD and reinstalled Software. Need address book from corrupted files on Time Machine.  How to get?, Apple store wiped HD and reinstalled Software. Need address book from corrupted files on Time Machine.  How to get?

    Had corrupted (?) files and Genius Bar wiped HD and reinstalled all software.  Need my address book from Time Machine, but cannot allow whole time machine to get to my HD as the corrupted files are on it also.
    They wiped HD 2 days ago and I came home and plugged in TM and immediately had corruption again, so had to return to Store for a 2nd erasure.  Now can't locate my Address book on TM.
    quilterlynn

    bump

  • How to move old address book (XP) into new computer (8.1) as the existing default address book.

    I have exported the address book in LDIF format and have also found the abook.mab file in my old XP computer. My new W8.1 address book is totally empty. I don't know where to find the Profile folder on W8.1 and when I import the LDIF it creates a new address book folder which I don't want. I just want everything in the default address book.

    Open the newly created address book. Click on one contact to select it. Hit control+a to select them all. Drag and drop them on the personal Address Book folder to move them there.

  • Keep getting incorrect password message when trying to sync my address book with google account. Anyone else have this trouble? Know of a solution?

    Keep getting incorrect password message when trying to sync my address book with google account. Anyone else have this trouble? Know of a solution?

    You can not create an iCloud account on a PC, you may create one on an iPad, iPhone or a Mac

  • I have Outlook 2011 installed on my Mac Pro, but I can not install it icloud. I can only get through imail, iCal and Address Book in Mac native anyone know teach me how to work with Outlook 2011 icloud? thank you

    I have Outlook 2011 installed on my Mac Pro, but I can not install it icloud. I can only get through imail, iCal and Address Book in Mac native anyone know teach me how to work with Outlook 2011 icloud? thank you

    "iCloud requires iOS 5 on iPhone 3GS or later, iPod touch (3rd and 4th generation), iPad, or iPad 2; a Mac computer with OS X Lion; or a PC with Windows Vista or Windows 7 (Outlook 2007 or 2010 or an up-to-date browser is required for accessing email, contacts, and calendars). Some features require a Wi-Fi connection. Some features are not available in all countries. Access to some services is limited to 10 devices."
    From here >  http://www.apple.com/icloud/

  • How to get address book from Mac desktop to a MacBook Pro

    I recently bought a MacBook Pro 13" with Lion.  I have a IMac desktop and want to put my address book from it to the MacBook Pro and don't know how to do it.  Can someone help me with this?  I also need to move my word documents. I have Microsoft Word for Mac 2004, Version 11.6.3 on the desktop. Is it possible to move over also? 

    Office 2004 wont work on Lion 10.7. You should upgrade. From your iMac:
    User/Library/Application Support. Copy the AddressBook folder to the desktop of your new MBP. On the MBP:
    From the Finder. Hold down the option key and click on Go from the menu and select Library. That'll open the User/Library folder. Open the Application Support folder and put your AddressBook folder there. Moving documents: Connect the two with firewire cables. The iMac should be shut down. Boot the iMac while holding down the 't' key. That'll boot it into target disk mode and you should see the iMac's hard drive on the MBP's desktop. Copy the files over.

Maybe you are looking for

  • Urgent: Can't lookup entity bean

    Dear all, I define a business process in workflow engine, which invoke a java class to get DB data through CMP entity bean. The entity bean was packed in to a ear and was workable/callable within the same ear. However, when the workflow engine can't

  • Facing problem while unloading the SWF file in SWF Loader

    Facing problem with SWF Loader. Background: I've 4 SWF files (demo1.swf, demo1_skin.swf, demo2.swf and demo2_skin.swf). These swf files are created throgh Adobe Captivate. Playing demo1_skin, will play the demo1.swf with the controls at the button su

  • Events show up twice on my calendar, why?

    events show up twice on my calendar, why?

  • HT203167 How do I get back my old apps?

    I just updated my iTouch software and when everything was finished - I lost all my old apps.  Most of the apps I paid a lot of money for.  How do I find my lost Apps?

  • Unable to import photos into Lightroom 5 from anywhere.

    I am running the CC version of LIghtroom 5 on a macbook with OSX 10.7.5.  I upgraded to lightroom 5 and have not been able to import any photos into Lightroom.  Every folder that I click on in the import dialogue looks empty.  I have tried from the W