【发布时间】:2012-01-10 08:19:47
【问题描述】:
有没有办法只搜索 GAL 中联系人的 givenName 或 LastName 或电子邮件地址?目前我有这些代码:
Private Sub QuickSearch() 'Working!
Dim oApp As New Outlook.Application
Dim eu As Outlook.ExchangeUser = oApp.GetNamespace("MAPI").AddressLists("Global Address List").AddressEntries("Justin Timberlake").GetExchangeUser()
If Not eu Is Nothing Then
response.write(eu.Name + ": " + eu.Alias + ", " + eu.FirstName + ", " + eu.LastName + ", " + eu.MobileTelephoneNumber + ", " + eu.Department + ", " + eu.PrimarySmtpAddress)
End If
oApp.Quit()
End Sub
嗯,这个就像通过 AddressList GAL 进行快速搜索一样。但是出现了一个问题,例如我有这些联系人姓名:
- 贾斯汀比伯
- 贾斯汀·汀布莱克
我搜索了 Justin,只有 Justin Bieber 会是结果,因为它是列表中的第一个。
【问题讨论】:
标签: asp.net vb.net office-interop outlook-2010