Rendering Collections
The ContainerRenderer object is used to render one or more properties from a collection of MAPI objects, as shown in the following procedure.
To render a collection
- Open the collection within the MAPI object, such as the Inbox.Messages collection or the Inbox.Folders collection. For example, to open the Messages collection of the logged-in user’s Inbox, use objSession.Inbox.Messages.
- If it does not already exist, create the ContainerRenderer object with a call such as objRenderApp.CreateRenderer Method ( class ). For more information, see About Renderer Objects.
- Set the DataSource to the collection to be rendered with a command such as Set objCR.DataSource = Inbox. For more information, see Setting the Data Source.
- Optionally, to create active links, set the LinkPattern property. For more information, see Named Formats.
- Add any additional Formats needed to render your collection. For example, to render the contents table of an Inbox, you will probably need to include formats for the MAPI properties PR_IMPORTANCE, PR_MESSAGE_CLASS, and PR_HASATTACH.
- Render the object. For collections, you will generally render directly to the screen.