IAddressee Interface

Topic Last Modified: 2006-06-13

Provides address resolution for names and free/busy information for appointment attendees.

CLSID

CD000139-8B95-11D1-82DB-00C04FB1625D

Extends

IDispatch

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Member Summary

The following table lists the properties of the IAddressee interface.

Name Description

AmbiguousNames

A reference to an Addressees collection containing all addressees that match the ambiguous criteria used to resolve a particular addressee. This property is read-only.

Configuration

A reference to a Configuration object used to define configuration information for the object.

ContentClass

Returns the content class of a resolved addressee. This property is read-only.

DataSource

Reserved for future use. This property is read-only.

DirURL

Contains the directory URL to the resolved user object in Active Directory. This property is read-only.

DisplayName

Contains the display name of the addressee.

EmailAddress

Contains the e-mail address of an addressee.

Fields

Reserved for future use. This property is read-only.

ResolvedStatus

Indicates the resolution status of this addressee.

The following table lists the methods of the IAddressee interface.

Name Description

CheckName

Attempts to resolve an addressee directory object using the information specified in the object.

GetFreeBusy

Gets the free/busy information for a resolved addressee.

GetInterface

Returns the specified dual interface on this object.

Example

[VBScript]

<Job id="resolveaddressee">

<reference object="cdo.message"/>
<reference object="adodb.connection"/>

<script language="VBScript">

Dim iPer
Set iPer = getCurrentPersonObject_ro

Wscript.Echo "User E-Mail Address:"
wscript.echo iPer.Email

WScript.Echo "User Mailbox folder URL: " 
Wscript.Echo iPer.GetInterface("IMailbox").BaseFolder


Function getCurrentPersonObject_ro()

 Dim Info
 Set Info   = CreateObject("ADSystemInfo")
 Dim InfoNT
 Set InfoNT = CreateObject("WinNTSystemInfo")
 Dim iPer 
 Set iPer   = CreateObject("CDO.Person")
 Dim iAddr
 Dim iAddr2
 Set iAddr  = CreateObject("CDO.Addressee")

 iAddr.EmailAddress = LCase(InfoNT.UserName) & "@" & Info.DomainDNSName

 ' Search by binding to an LDAP server in current domain.
 If Not iAddr.CheckName("LDAP://" & Info.DomainDNSName) Then
  ' Handle Ambiguous names here
   For Each iAddr2 in iAddr.AmbiguousNames
     wscript.echo iAddr2.DisplayName
     wscript.echo iAddr2.EmailAddress
 Else

  ' Note that this is for illustration purposes only as
  ' We already have the server-less LDAP URL to the current user:
  ' "LDAP://" & Info.UserName
  ' Or,
  ' "LDAP://" & Info.DomainDNSName & "/" & Info.UserName

  Wscript.Echo "LDAP://" & Info.DomainDNSName & "/" & Info.UserName
  Wscript.Echo iAddr.DirURL

  iPer.DataSource.Open iAddr.DirURL
 End If

 Set getCurrentPersonObject_ro = iPer

End Function
</script>
</Job>