Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO craziness

Status
Not open for further replies.

Shilohcity

Technical User
Jul 12, 2000
136
GB
Hi there

I have some very weird CDO experiences to relate. I have a page which is talking to our Exchange 5.5 server and is drawing the contents of an address book back to a web page. This is working kind of OK except that sometimes the field

<%=Addentr.Fields(&H39FE001E).value%>'Email Field

displays correctly and sometimes it displays as a series of &quot;?????????????&quot;. This is very weird.

I am also having trouble getting the field info for group info.

If anybody had any suggestions on either of these probs it would be most appreciated.

Full code:

'create the CDO session object
Set objSession = CreateObject(&quot;MAPI.Session&quot;)
'Generate the logon string using the session variables which you set the first time you opened 'mainpage.asp



bstrProfileInfo = &quot;free01&quot; + vbLf + &quot;administrator&quot;
' Logon to a new session
objSession.Logon , , , true, , true, bstrProfileInfo

'Get the address lists collection
Dim Addlist,Addname
Set Addlists = Nothing
Set Addlists = objSession.AddressLists.AdressEntries
'Set Addlists = objSession.AddressLists(&quot;Global Address List&quot;).AddressEntries


'Go to the Freedom Recipients address list
For m = 1 To Addlists.Count
name = Addlists.Item(m).Name
If (Addlists.Item(m).Name = IDVAL) Then

Set Addlist = Addlists.Item(m)
Set Addentrs = Addlist.AddressEntries
Dim objAddrEntFilt
Set objAddrEntFilt = Addentrs.Filter
Counterval = Addentrs.Count
%>


<%
For l = 1 To Counterval
Set Addentr = Addentrs.Item(l)
%>
Name<%=Addentr.Name%><br>
Address<%=Addentr.Address%><br>
Display<%=Addentr.Fields(&H3001001E).value%><br>
Alias<%=Addentr.Fields(&H3A00001E).value%><br>
Common<%=Addentr.Fields(&H3A0F001E).value%><br>
FirstName<%=Addentr.Fields(&H3A06001E).value%><br>
LastName<%=Addentr.Fields(&H3A11001E).value%> <br>
Email<%=Addentr.Fields(&H39FE001E).value%> <br>


Thanks
Justin X-) &quot;Creativity is the ability to introduce order into the randomness of nature.&quot; Eric Hoffer

Visit me at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top