?
Solved

Find Address by Alias for outlook?

Posted on 2009-04-21
6
Medium Priority
?
2,552 Views
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")
oGal.AddressEntries(Me.TextBox1.Text).Address)

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
0
Comment
Question by:baghlaf
  • 4
  • 2
6 Comments
 
LVL 28

Expert Comment

by:peakpeak
ID: 24193515
Script code examples to build from here:
http://www.outlookcode.com (download Sues Code examples)
http://www.slovaktech.com/code_samples.htm
0
 

Author Comment

by:baghlaf
ID: 24193547
i am using Microsoft.Office.Interop.Outlook by vb.net 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.

Thanks
0
 
LVL 28

Expert Comment

by:peakpeak
ID: 24193615
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:baghlaf
ID: 24193633
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
                MessageBox.Show(ar.Address)
                Exit For

            End If
        Next

but i don't want this way,

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

Author Comment

by:baghlaf
ID: 24201592
you got my point, please let me know if there is another solution except above ?

Thanks
0
 

Accepted Solution

by:
baghlaf earned 0 total points
ID: 24264002
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
MS Outlook undoubtedly is the most widely used email client.Its user-friendliness, cost effectiveness, and availability with Microsoft Office Suite make it the most popular email application.  Its compatibility with Microsoft applications like Exch…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

839 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