Find Address by Alias for outlook?

Posted on 2009-04-21
Last Modified: 2013-11-29
Hello Experts,

Dim oApp As Outlook.Application = New Outlook.Application()

        ' Get Mapi NameSpace and Logon.
        Dim oNS As Outlook.NameSpace = oApp.GetNamespace("mapi")
        oNS.Logon("BASSAM", Missing.Value, False, True) ' TODO:

        ' Get Global Address List.
        Dim oDLs As Outlook.AddressLists = oNS.AddressLists
Dim oGal As Outlook.AddressList = oDLs.Item("Global Address List")

i need to search for specifiy AddressEntry y giving an alias not Name, i have tried to so sort like:
oGal.AddressEntries.Sort("[Alias]", Outlook.OlSortOrder.olAscending)

But it's not work

any help.please
Question by:baghlaf
    LVL 28

    Expert Comment

    Script code examples to build from here: (download Sues Code examples)

    Author Comment

    i am using Microsoft.Office.Interop.Outlook by and i have over 50,000 email in Global Address List and i need to quick return the Address x400 from AddressEntry by giving the alias instead of Display Name.

    LVL 28

    Expert Comment


    Author Comment

    i can do on another way like below but it's too slow because we have over 20000 users emails
    For Each ar As Outlook.AddressEntry In oGal.AddressEntries
                Dim strali As String = ar.GetExchangeUser().Alias
                If strali = Me.TextBox1.Text Then
                    Exit For

                End If

    but i don't want this way,

    i want to sort Entries by alias then filter it by alias given.

    Author Comment

    you got my point, please let me know if there is another solution except above ?


    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    There was an incident about the POP3 issue for the double read receipts and delivery receipts in Exchange 2013.  There was huge research been done and found solution for the duplicate mails. Especially when the user gets  duplicate mails.
    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now