Platform SDK: CDO 1.2.1

Web Access Example: Setting a Data Source

In Microsoft® Outlook Web Access, the data source is set after the creation of the object that will render the data. For example, a ContainerRenderer object is created and saved first (see When to Create Renderer Objects). Then, as the Web user navigates through the folder hierarchy, Web Access script sets the DataSource property.

For example, the following line sets a MAPI folder as a data source. This is valid because the Folder object contains a MAPIOBJECT property.

Set objObjectRenderer.DataSource = objFolder
 

In this call, objObjectRenderer is the CDO Rendering object and objFolder is the MAPI folder object obtained through CDO calls. This call adds a reference to the MAPI object (in a manner similar to an AddRef call) while setting it as the current DataSource.