none
How to access different columns in Address Book? RRS feed

  • Question

  • Please take a look at the attached screenshot. In this screenshot in the Address List, there are different columns: Location, Business Phone Number, Capacity, Description, E-Mail Address.

    Can someone please let me know, how to extract information from these columns?

    I am accessing each Address Entry using Address Entry Object.


    http://learn2automate.wordpress.com Vijay Gupta

    Thursday, September 12, 2013 1:29 PM

Answers

  • All MAPI properties can be accessed using AddressEntry.PropertyAccessor.GetProperty. To look up MAPI tags and their DASL names, take a look at existing address entries in OutlookSpy.

    1. To see the IMailUser object corresponding to the current user - click IMAPISession button, then QueryIdentity.

    2. To see address entries corresponding to the recipients of an existing message: click IMessage button, go to the GetRecipientTable tab, double click on a recipient.

    3. To drill down to any address book object in the current session - click IAddrBook, click ""Open Root Container", go to the GetHierarchyTable tab, double click on a container, go GetHierarchyTable tab again if you continue drilling down to a container or go to the GetContentsTable tab to open an address book object.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Thursday, September 12, 2013 4:49 PM

All replies

  • All MAPI properties can be accessed using AddressEntry.PropertyAccessor.GetProperty. To look up MAPI tags and their DASL names, take a look at existing address entries in OutlookSpy.

    1. To see the IMailUser object corresponding to the current user - click IMAPISession button, then QueryIdentity.

    2. To see address entries corresponding to the recipients of an existing message: click IMessage button, go to the GetRecipientTable tab, double click on a recipient.

    3. To drill down to any address book object in the current session - click IAddrBook, click ""Open Root Container", go to the GetHierarchyTable tab, double click on a container, go GetHierarchyTable tab again if you continue drilling down to a container or go to the GetContentsTable tab to open an address book object.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Thursday, September 12, 2013 4:49 PM
  • Dmitri,

    I downloaded Outlook Spy and when I followed the steps above, I am getting below:

    Please let me know what to do now as I do not know, how to proceed or what values to note:




    http://learn2automate.wordpress.com Vijay Gupta

    Friday, September 13, 2013 9:12 AM
  • Ok, double click on that container and go to the GetContentsTable tab to open a particular object.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, September 13, 2013 1:44 PM
  • Sorry Dmitri,

    Sorry but I dont know, what are the containers in the screenshot that I posted above and also, what the containers represent?

    Which objects do I need to select?


    http://learn2automate.wordpress.com Vijay Gupta

    Saturday, September 14, 2013 6:18 AM
  • They represent the same containers you see when you open the address book in Outlook (Ctrl+Shift+B) or click on the To/CC/BCC button in a message inspector.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Saturday, September 14, 2013 4:12 PM
  • But I have more containers when I open the Address Book:


    whereas I am getting only some of these in Outlook Spy after clicking on IAddrBook:

    (the concerned container for me is All Rooms)

    Please let me know, how to proceed now?


    http://learn2automate.wordpress.com

    Vijay Gupta






    • Edited by gupta vijay Monday, September 16, 2013 12:46 PM
    Monday, September 16, 2013 8:56 AM
  • Double click on the "All Address Lists" container. It will pop up another IABContainer  window.

    In that window, go to the GetHierarchyTable again. Double click on the "All Rooms" container.

    In that IABContainer  window, go to the GetContentsTable tab to see the entries.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, September 16, 2013 1:54 PM
  • Dmitri,

    Done till now. Please let me know, what to do now:


    http://learn2automate.wordpress.com Vijay Gupta


    • Edited by gupta vijay Monday, September 16, 2013 3:18 PM
    Monday, September 16, 2013 3:16 PM
  • Go to the GetContentsTable tab and open the room you are after. Look at the properties that you need to retrieve.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, September 16, 2013 3:19 PM