Type Property (CDONTS Attachment Object)

Type Property (CDONTS Attachment Object)

The Type property describes the attachment type. Read/write (read-only for an attachment on a message in the Inbox).

Syntax

        objAttach.Type 

Data Type

Long

Remarks

The following attachment types are supported:

Type property

Value

Description

CdoFileData

1

Attachment is the contents of a file. (Default value.)

CdoEmbeddedMessage

4

Attachment is an embedded message.

The value of the Type property determines the valid values for the Source property. Consequently, you must set Type before setting Source in order for the ReadFromFile and WriteToFile methods to work correctly.

The Type property can also be set at the time of creation of the attachment by supplying the type parameter to the Add method of the Attachments collection.

Example

See the example for the Attachment object's Source property.

See Also

Concepts

Attachment Object (CDONTS Library)