2
有没有办法在GAL中只搜索联系人的givenName或LastName或emailaddress?目前我有这些代码:通过全球通讯录搜索
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快速搜索。但一个问题出现的是,比如我有这些联系人姓名:
- 贾斯汀比伯
- 贾斯汀
而且我搜索了贾斯汀,只有贾斯汀比伯会因为它是第一个在名单上看到的结果。
碰撞迭代!有人请吗? –