Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8228923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:37:31+00:00 2026-06-07T16:37:31+00:00

I’m trying to read out the Internet formatted address from an Exchange connected Outlook.

  • 0

I’m trying to read out the Internet formatted address from an Exchange connected Outlook. I read all contacts from the Outlook Contacts, i.e. not from the Global Address Book (GAB), and the problem is that for all users that are stored in Contacts from the Exchange GAB I’ve only managed to read out the X.500 formatted address which is not useful in this case. For all manually added contacts that are not in the domain of the Exchange server, the Internet address is exported as expected.

Basically I’ve used the following code snippet to enumerate the Contacts:

static void Main(string[] args)
{
    var outlookApplication = new Application();
    NameSpace mapiNamespace = outlookApplication.GetNamespace("MAPI");
    MAPIFolder contacts = mapiNamespace.GetDefaultFolder(OlDefaultFolders.olFolderContacts);

    for (int i = 1; i < contacts.Items.Count + 1; i++)
    {
        try
        {
            ContactItem contact = (ContactItem)contacts.Items[i];
            Console.WriteLine(contact.FullName);
            Console.WriteLine(contact.Email1Address);
            Console.WriteLine(contact.Email2Address);
            Console.WriteLine(contact.Email3Address);
            Console.WriteLine();
        }
        catch (System.Exception e) { }
    }
    Console.Read();
}

Is there any way to extract the Internet address instead of the X.500?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:37:32+00:00Added an answer on June 7, 2026 at 4:37 pm

    You need to convert from ContactItem to AddressEntry – one email address at a time.

    To do this, you need to access the AddressEntry via the Recipient object model. The only way to retrieve the actual Recipient EntryID is by leveraging the PropertyAccessor of the ContactItem.

    const string Email1EntryIdPropertyAccessor = "http://schemas.microsoft.com/mapi/id/{00062004-0000-0000-C000-000000000046}/80850102";
    string address = string.Empty;
    Outlook.Folder folder = this.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts) as Outlook.Folder;
    foreach (var contact in folder.Items.Cast<Outlook.ContactItem>().Where(c=>!string.IsNullOrEmpty(c.Email1EntryID)))
    {
        Outlook.PropertyAccessor propertyAccessor = contact.PropertyAccessor;
        object rawPropertyValue = propertyAccessor.GetProperty(Email1EntryIdPropertyAccessor);
        string recipientEntryID = propertyAccessor.BinaryToString(rawPropertyValue);
        Outlook.Recipient recipient = this.Application.Session.GetRecipientFromID(recipientEntryID);
        if (recipient != null && recipient.Resolve() && recipient.AddressEntry != null)
            address = recipient.AddressEntry.GetExchangeUser().PrimarySmtpAddress;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I m trying to read the contacts from the contacts table and store all
I'm trying to read out the POST-Data that was sent from a form in
I'm trying to create a XML structure (not read/write from/to a file, only the
I have searched and read through the internet trying to figure out this problem.
I'm trying to read a remote binary file (say, image) from internet like this:
I'm trying to read data out of a database I created, but I always
I'm trying to have Screenreaders (I'm testing with NVDA) read out the AutomationProperties.Name and
I'm trying to find out how to read/write notations like this: jQuery.getJSON( url [,
I have been trying to figure out how to read paragraph content which exists
I'm trying to figure out how I would read a file, and then count

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.