Attachment Attachment Attachment Interface

Definition

Represents a document or link to a document contained in an Outlook item.

public interface class Attachment
[System.Runtime.InteropServices.Guid("00063007-0000-0000-C000-000000000046")]
public interface Attachment
Public Interface Attachment
Attributes

Remarks

Use Item[Object] (index), where index is the index number, to return a single Attachment object.

Use the Add(Object, Object, Object, Object) method to add an attachment to an item.

Properties

Application Application Application

Returns an Application object that represents the parent Outlook application for the object. Read-only.

BlockLevel BlockLevel BlockLevel

Returns an OlAttachmentBlockLevel constant that specifies if there is any restriction on the attachment based on its file extension. Read-only.

Class Class Class

Returns an OlObjectClass constant indicating the object's class. Read-only.

DisplayName DisplayName DisplayName

Returns or sets a String (string in C#) representing the name, which does not need to be the actual file name, displayed below the icon representing the embedded attachment. Read/write.

FileName FileName FileName

Returns a String (string in C#) representing the file name of the attachment. Read-only.

Index Index Index

Returns an Integer (int in C#) value indicating the position of the object within the collection. Read-only.

MAPIOBJECT MAPIOBJECT MAPIOBJECT

This object, member, or enumeration is deprecated and is not intended to be used in your code.

Parent Parent Parent

Returns the parent Object of the specified object. Read-only.

PathName PathName PathName

Returns a String (string in C#) representing the full path to the linked attached file. Read-only.

Position Position Position

Returns or sets an Integer (int in C#) value indicating the position of the attachment within the body of the item. Read/write.

PropertyAccessor PropertyAccessor PropertyAccessor

Returns a PropertyAccessor object that supports creating, getting, setting, and deleting properties of the parent Attachment object. Read-only.

Session Session Session

Returns the NameSpace object for the current session. Read-only.

Size Size Size

Returns an Integer (int in C#) value indicating the size (in bytes) of the attachment. Read-only.

Type Type Type

Returns an OlAttachmentType constant indicating the type of the specified object. Read-only.

Methods

Delete() Delete() Delete()

Deletes an object from the collection.

GetTemporaryFilePath() GetTemporaryFilePath() GetTemporaryFilePath()

Returns the full path to the attached file that is in a temporary-files folder. Read-only.

SaveAsFile(String) SaveAsFile(String) SaveAsFile(String)

Saves the attachment to the specified path.

Applies to