有没有办法只搜索 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 进行的快速搜索一样。但是出现了一个问题,例如我有这些联系人姓名:
- 贾斯汀比伯
- 贾斯汀汀布莱克
我搜索了贾斯汀,只有贾斯汀比伯会是结果,因为它是第一个出现在列表中的人。