Platform SDK: Exchange 2000 Server

Accessing Mailboxes and Folders

[This is preliminary documentation and subject to change.]

Management of recipients involves modifying items in both the Microsoft Active Directory as well as items in the Exchange 2000 Server. You access different locations depending on the type of object you are using. See The Active Directory and CDOEXM for more information on the use of the Active Directory in Exchange.

Person and User Objects use LDAP

To use CDOEXM interfaces in the Person and User objects, you bind to the Active Directory using an LDAP Uniform Resource Locator (URL). For example:

Dim objPerson As New CDO.Person
objPerson.DataSource.Open 
"LDAP://MYSERVER1/CN=jamessmith,CN=users,
DC=CompanyADomain,DC=Dev,DC=com"

The LDAP URL is comprised of the following parts::

"LDAP://servername/CN=RecipientName,CN=FolderAlias,
DC=DomainNamePart,DC=DomainNamePart2,DC=DomainNamePartn"

Folder Objects use ExOLEDB

To use CDOEXM interfaces in the Folder object you connect directly to an information store using the Exchange OLE DB provider. Connect to the store by providing a "File:" URL. An open statement might look like the following:

Dim objFolder As New CDO.Folder
fullurl = "file://./backofficestorage/MyDomain.wherever.com/Public Folders/Folder3"
objFolder.DataSource.Open fullurl, , adModeReadWrite, adFailIfNotExists 

The File URL parts are defined here:

 fullurl = "file://./backofficestorage/DomainName/FolderName"

See Building a Restricted Address List for an example of working with a folder.