O'Reilly logo

CDO & MAPI Programming with Visual Basic: by Dave Grundgeiger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending OLE Objects

MAPI supports embedding one document inside another, a concept known as OLE in Windows parlance. The document to be embedded in the message must have been previously saved as an OLE docfile (see sidebar). To attach it to a message, specify the parameters to the Attachment collection’s Add method as follows:

  1. Set the Type parameter to CdoOle.

  2. Set the Source parameter to the full path and filename of the docfile.

  3. Set the Position parameter to the character position within the message text at which the receiving mail client should render the object.

  4. Set the Name parameter to an empty string, or omit it from the parameter list.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required