
Accessing Outlook "Global Address List"
Hi,
I have a client side script that reads the global address list and returns
all the users in the list. However this only returns the X400 version of the
adderss i.e. /o=myCompany/ou=myDOMAIN/cn=MyContainer/cn=myName
As this will need to integrate with a component such as CDONTS I need to
retrieve the SMTP form of the address but can't find a property or
conversion function.
Does one exists/is it possible to retrieve the SMTP form of the address?
I have included the script below:
<script language="VBScript">
on error resume next
Set myApplication = CreateObject("Outlook.Application")
Set myNameSpace = myApplication.GetNameSpace("MAPI")
Set myAddressList = myNameSpace.AddressLists("Recipients")
Set myAddressEntries = myAddressList.AddressEntries
for i = 1 to myAddressEntries.count
if myAddressEntries(i).displaytype = 1 then
document.write "<strong>" & myAddressEntries(i).address & "</strong>
<br>"
set myMembers = myAddressEntries(i).members
for j = 0 to myMembers.count
document.write "- " & myMembers(j).address & "<br>"
next
set myMembers = nothing
document.write "<br>"
end if
next
set myAddressEntries = nothing
set myAddressList = nothing
set myNameSpace = nothing
set myApplication = nothing
if err.number > 0 then
strError = "<br><br>There was an error.<br>" & err.number & " : " &
err.description
document.write strError
end if
</script>
Many thanks (in advance),
Fuzzy