Skip to Content
CDO & MAPI Programming with Visual Basic:
book

CDO & MAPI Programming with Visual Basic:

by Dave Grundgeiger
October 2000
Intermediate to advanced
384 pages
10h 22m
English
O'Reilly Media, Inc.
Content preview from CDO & MAPI Programming with Visual Basic:

Displaying CDO Data

From previous chapters, you already know how to traverse the CDO object model. For a review of the CDO object model, refer back to Chapter 5. In the current chapter, I won’t spend time on the structure of CDO. Rather, I’ll focus on explaining how to display CDO’s various objects on a web page.

To display CDO data on a web page, it is necessary to generate HTML that represents the data, and to send that HTML to the user’s browser. There are two ways to generate the HTML. One is to execute script that reads CDO object properties and constructs HTML strings based on property values, and the other is to pass CDO objects to CDO Rendering Library objects and to ask the CDO Rendering Library objects to create the HTML.

Generating HTML in Script

Example 11-6 shows a function that takes as an argument a CDO InfoStores collection object and returns an HTML string representing the list of InfoStore objects in the collection. In this example I chose to build a one-column HTML table, with one row per information store. The names of the information stores are displayed in the cells of the table. I have also used line breaks (vbCrLf) and white space to make the generated HTML more readable to anyone viewing the raw HTML. This is for aesthetic reasons only, and has no effect on the browser’s display. Example 11-7 shows an example of the HTML this function might generate for an InfoStores collection having two items.

Example 11-6. Rendering an InfoStores Collection

Public ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel® 2007 VBA Programmer's Reference

Excel® 2007 VBA Programmer's Reference

John Green, Stephen Bullen, Rob Bovey, Michael Alexander
COM Programming with Microsoft® .NET

COM Programming with Microsoft® .NET

John Paul Mueller, Julian Templeman

Publisher Resources

ISBN: 156592665XSupplemental ContentCatalog PageErrata