Distribution List Manager
This sample creates a distribution list and populates it with the users found using an ADO query. It performs the following tasks:
- Determine the domain address extension by looking at the mail property of the Microsoft Private MDB object.
- Use the OpenDSObject method to access directory objects, passing the user's logon domain, name, and password as parameters.
- Build SMTP, MSMAIL, CCMAIL, and X.400 addresses.
- Create the distribution list.
- Convert data into string values (using the CStr function) to properly format the data for ADSI.
- Create a multi-valued property.
- Locate a mailbox in the Microsoft Exchange directory whose City (Location) property matches the search criteria.
For the complete code of this sample, see Distribution List Manager Sample Code.