Attachment.Position Property

Definition

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

public:
 property int Position { int get(); void set(int value); };
public int Position { get; set; }
Public Property Position As Integer

Property Value

Remarks

The Position property only works on an attachment for an item where the body format is Rich Text (RTF). If the body format is not RTF, the Position property is ignored for a set operation and always returns zero (0) for a get operation.

If you set the Position property to 0 for an item where the body format is RTF, the attachment will be hidden in Outlook's user interface. The attachment is not visible in a view, and the user cannot remove the attachment from the body of the item. The attachment can still be accessed through the Attachments collection on the item.

The only item that allows programmatic setting of the BodyFormat property is a MailItem. Other item types such as Appointment, Contact, and Task are RTF by default.

Applies to