Attachment Object
Attachment Object
The Attachment object represents a document that is an attachment of a message.
At a Glance
Specified in type library: |
CDO.DLL |
First available in: |
CDO Library version 1.0.a |
Parent objects: |
Attachments collection |
Child objects: |
Fields collection |
Default property: |
Properties
Name |
Available since version |
Type |
Access |
1.0.a |
String |
Read-only |
|
1.0.a |
Long |
Read-only |
|
1.1 |
Field object or Fields collection object |
Read-only |
|
1.0.a |
Long |
Read-only |
|
1.1 |
IUnknown object |
Read/write (Note: Not available to Visual Basic applications) |
|
1.0.a |
String |
Read/write |
|
1.0.a |
Attachments collection object |
Read-only |
|
1.0.a |
Long |
Read/write |
|
1.0.a |
Session object |
Read-only |
|
1.0.a |
String or Message object |
Read/write |
|
1.0.a |
Long |
Read/write |
Methods
Name |
Available since version |
Parameters |
1.0.a |
(none) |
|
1.1 |
objAttach2 as Object |
|
1.0.a |
fileName as String |
|
1.0.a |
fileName as String |
Remarks
An attachment is an object, such as a file or an OLE object, that is associated with and transmitted with a Message object. It is assigned a particular location within the message, specified by the Position property, and overwrites the character at that position when the message is displayed to a messaging user. Typically, a placeholder such as an icon is displayed instead of the attachment's contents, until the user requests that the attachment be opened and displayed in its entirety.
The Microsoft® CDO Library does not manage the actual display of the attachment or its placeholder. The properties of the Attachment object simply provide information which the displaying application can use to find and open the attachment, select a suitable placeholder, and convert the attachment's contents into a display.
An Attachment object can be rendered into HTML hypertext using the CDO Rendering ObjectRenderer object. To specify this, set the object renderer's DataSource property to the Attachment object itself. The individual properties that can be rendered with the RenderProperty method are indicated in the Attachment object property descriptions.