Platform SDK: CDO 1.2.1

Attachment Object (CDONTS Library)

The Attachment object represents a file or message that is an attachment of a message.

At a Glance

Specified in type library: CDONTS.DLL
First available in: CDO for NTS Library version 1.2
Parent objects: Attachments collection
Child objects: (none)
Default property: Name

No modifications are permitted to messages in the Inbox, except for message deletion. Therefore, all properties on an Attachment object are treated as read-only when the grandparent Message object is in the Inbox. When the access is described as read/write in the following table, that access applies only to attachments on messages in the Outbox.

Properties


Name
Available since version
Type

Access
Application 1.2 String Read-only
Class 1.2 Long Read-only
ContentBase 1.2 String Read-only
     
ContentID 1.2 String Read-only
ContentLocation 1.2 String Read-only
Name 1.2 String Read/write
Parent 1.2 Attachments collection object Read-only
Session 1.2 Session object Read-only
Source 1.2 String or Message object Read/write
Type 1.2 Long Read/write

Methods


Name
Available since version
Parameters
Delete 1.2 (none)
ReadFromFile 1.2 fileName as String
WriteToFile 1.2 fileName as String

Remarks

An attachment is an object, such as a file or another object, that is associated with and transmitted with a Message object. The Attachment object does not specify its location within the message. The client application makes all the display decisions for a message, including whether its attachments are to be displayed, and if so, when and where.

The CDO for NTS Library does not manage the actual display of the attachment. The properties of the Attachment object simply provide information that the displaying application can use to find and open the attachment, and to convert its contents into a display.