Class MailItem (Outlook VBA)

The class MailItem represents a mail message.

The classes AppointmentItem, CalendarSharing, ContactItem, JournalItem, MeetingItem, PostItem and SharingItem. give access to class MailItem


Dim mim as MailItem
Set mim = Session.CreateSharingItem.Reply()

For Each

Here is an example of processing the MailItem items in a collection.


Dim mimItem As MailItem
For Each mimItem In Session.Items
	
Next mimItem

Methods

AddBusinessCard - Appends contact information based on the Electronic Business Card (EBC) associated with the specified ContactItem object to the MailItem object.

ClearConversationIndex - Clears the index of the conversation thread for the mail message.

ClearTaskFlag - Clears the MailItem object as a task.

Copy - Creates another instance of an object.

Delete - Removes the item from the folder that contains the item.

Display - Displays a new Inspector object for the item.

GetConversation - Obtains a Conversation object that represents the conversation to which this item belongs.

MarkAsTask - Marks a MailItem object as a task and assigns a task interval for the object.

Move - Moves a Microsoft Outlook item to a new folder.

PrintOut - Prints the Outlook item using all default settings.The PrintOut method is the only Outlook method that can be used for printing.

Save - Saves the Microsoft Outlook item to the current folder or, if this is a new item, to the Outlook default folder for the item type.

SaveAs - Saves the Microsoft Outlook item to the specified path and in the format of the specified file type. If the file type is not specified, the MSG format (.msg) is used.

ShowCategoriesDialog - Displays the Show Categories dialog box, which allows you to select categories that correspond to the subject of the item.

Properties

Actions returns an Actions collection that represents all the available actions for the item.

AlternateRecipientAllowed returns a Boolean value that indicates whether the mail message can be forwarded.

Attachments returns an Attachments object that represents all the attachments for the specified item.

AutoForwarded a Boolean value that returns True if the item was automatically forwarded.

AutoResolvedWinner returns a Boolean that determines if the item is a winner of an automatic conflict resolution.

BCC returns a String representing the display list of blind carbon copy (BCC) names for a MailItem.

BillingInformation returns or sets a String representing the billing information associated with the Outlook item.

Body returns or sets a String representing the clear-text body of the Outlook item.

BodyFormat returns or sets an OlBodyFormat constant indicating the format of the body text.

Categories returns or sets a String representing the categories assigned to the Outlook item.

CC returns a String representing the display list of carbon copy (CC) names for a MailItem.

Class returns an OlObjectClass constant indicating the object's class.

Companies returns or sets a String representing the names of the companies associated with the Outlook item.

Conflicts return the Conflicts object that represents the items that are in conflict for any Outlook item object.

ConversationID returns a String that uniquely identifies a Conversation object that the MailItem object belongs to.

ConversationIndex returns a String that indicates the relative position of the item within the conversation thread.

ConversationTopic returns a String representing the topic of the conversation thread of the Outlook item.

CreationTime returns a Date indicating the creation time for the Outlook item.

DeferredDeliveryTime returns or sets a Date indicating the date and time the mail message is to be delivered.

DeleteAfterSubmit returns or sets a Boolean value that is True if a copy of the mail message is not saved upon being sent, and False if a copy is saved in Sent Items folder.

DownloadState returns a constant that belongs to the OlDownloadState enumeration indicating the download state of the item.

EntryID returns a String representing the unique Entry ID of the object.

ExpiryTime returns or sets a Date indicating the date and time at which the item becomes invalid and can be deleted.

FlagRequest returns or sets a String that indicates the requested action for a mail item.

FormDescription returns the FormDescription object that represents the form description for the specified Outlook item.

GetInspector returns an Inspector object that represents an inspector initialized to contain the specified item.

HTMLBody returns or sets a String representing the HTML body of the specified item.

Importance returns or sets an OlImportance constant indicating the relative importance level for the Outlook item.

InternetCodepage returns or sets a Long that determines the Internet code page used by the item.

IsConflict returns a Boolean that determines if the item is in conflict.

IsMarkedAsTask returns a Boolean value that indicates whether the MailItem is marked as a task.

ItemProperties returns an ItemProperties collection that represents all standard and user-defined properties associated with the Outlook item.

LastModificationTime returns a Date specifying the date and time that the Outlook item was last modified.

MarkForDownload returns or sets an OlRemoteStatus constant that determines the status of an item once it is received by a remote user.

MessageClass returns or sets a String representing the message class for the Outlook item.

Mileage returns or sets a String representing the mileage for an item.

NoAging returns or sets a Boolean value that is True to not age the Outlook item.

OriginatorDeliveryReportRequested returns or sets a Boolean value that determines whether the originator of the meeting item or mail message will receive a delivery report.

OutlookInternalVersion returns a Long representing the build number of the Outlook application for an Outlook item.

OutlookVersion returns a String indicating the major and minor version number of the Outlook application for an Outlook item.

Permission sets or returns an OlPermission constant that determines what permissions to grant to the recipients of the email item.

PermissionService sets or returns an OlPermissionService constant that determines the permission service that will be used when sending a message protected by Information Rights Management (IRM).

PermissionTemplateGuid returns or sets a String value that represents the GUID of the template file to apply to the MailItem in order to specify Information Rights Management (IRM) permissions.

PropertyAccessor returns a PropertyAccessor object that supports creating, getting, setting, and deleting properties of the parent MailItem object.

ReadReceiptRequested returns a Boolean value that indicates True if a read receipt has been requested by the sender.

ReceivedByEntryID returns a String representing the EntryID for the true recipient as set by the transport provider delivering the mail message.

ReceivedByName returns a String representing the display name of the true recipient for the mail message.

ReceivedOnBehalfOfEntryID returns a String representing the EntryID of the user delegated to represent the recipient for the mail message.

ReceivedOnBehalfOfName returns a String representing the display name of the user delegated to represent the recipient for the mail message.

ReceivedTime returns a Date indicating the date and time at which the item was received.

RecipientReassignmentProhibited returns a Boolean that indicates True if the recipient cannot forward the mail message.

Recipients returns a Recipients collection that represents all the recipients for the Outlook item.

ReminderOverrideDefault returns or sets a Boolean value that is True if the reminder overrides the default reminder behavior for the item.

ReminderPlaySound returns or sets a Boolean value that is True if the reminder should play a sound when it occurs for this item.

ReminderSet returns or sets a Boolean value that is True if a reminder has been set for this item.

ReminderSoundFile returns or sets a String indicating the path and file name of the sound file to play when the reminder occurs for the Outlook item.

ReminderTime returns or sets a Date indicating the date and time at which the reminder should occur for the specified item.

RemoteStatus returns or sets an OlRemoteStatus constant specifying the remote status of the mail message.

ReplyRecipientNames returns a semicolon-delimited String list of reply recipients for the mail message.

ReplyRecipients returns a Recipients collection that represents all the reply recipient objects for the Outlook item.

RetentionExpirationDate returns a Date that specifies the date when the MailItem object expires, after which the Messaging Records Management (MRM) Assistant will delete the item.

RetentionPolicyName returns a String that specifies the name of the retention policy.

RTFBody returns or sets a Byte array that represents the body of the Microsoft Outlook item in Rich Text Format. Read/write.

Saved returns a Boolean value that is True if the Outlook item has not been modified since the last save.

SaveSentMessageFolder returns or sets a Folder object that represents the folder in which a copy of the email message will be saved after being sent.

Sender returns or sets an AddressEntry object that corresponds to the user of the account from which the MailItem is sent.

SenderEmailAddress returns a String that represents the email address of the sender of the Outlook item.

SenderEmailType returns a String that represents the type of entry for the email address of the sender of the Outlook item, such as 'SMTP' for Internet address, 'EX' for a Microsoft Exchange server address, etc.

SenderName returns a String indicating the display name of the sender for the Outlook item.

SendUsingAccount returns or sets an Account object that represents the account under which the MailItem is to be sent.

Sensitivity returns or sets a constant in the OlSensitivity enumeration indicating the sensitivity for the Outlook item.

Sent returns a Boolean value that indicates if a message has been sent.

SentOn returns a Date indicating the date and time on which the Outlook item was sent.

SentOnBehalfOfName returns a String indicating the display name for the intended sender of the mail message.

Session returns the NameSpace object for the current session.

Size returns a Long indicating the size (in bytes) of the Outlook item.

Subject returns or sets a String indicating the subject for the Outlook item.

Submitted returns a Boolean value that is True if the item has been submitted.

TaskCompletedDate returns or sets a Date value that represents the completion date of the task for this MailItem.

TaskDueDate returns or sets a Date value that represents the due date of the task for this MailItem.

TaskStartDate returns or sets a Date value that represents the start date of the task for this MailItem object.

TaskSubject returns or sets a String value that represents the subject of the task for the MailItem object.

To returns or sets a semicolon-delimited String list of display names for the To recipients for the Outlook item.

ToDoTaskOrdinal returns or sets a Date value that represents the ordinal value of the task for the MailItem.

UnRead returns or sets a Boolean value that is True if the Outlook item has not been opened (read).

UserProperties returns the UserProperties collection that represents all the user properties for the Outlook item.

VotingOptions returns or sets a String specifying a delimited string containing the voting options for the mail message.

VotingResponse returns or sets a String specifying the voting response for the mail message.

Account - The Account object represents an account that is defined for the current profile.

Actions - Contains a collection of Action objects that represent all the specialized actions that can be executed on an Outlook item.

AddressEntry - Represents a person, group, or public folder to which the messaging system can deliver messages.

Attachments - Contains a set of Attachment objects that represent the attachments in an Outlook item.

Conflicts - Contains a collection of Conflict objects that represent all Microsoft Outlook items that are in conflict with a particular Outlook item.

Conversation - Represents a conversation that includes one or more items stored in one or more folders and stores.

Folder - Represents an Outlook folder.

FormDescription - Represents the general properties of an Outlook form.

Inspector - Represents the window in which an Outlook item is displayed.

ItemProperties - A collection of all properties associated with the item.

NameSpace - Represents an abstract root object for any data source.

PropertyAccessor - Provides the ability to create, get, set, and delete properties on objects.

Recipients - Contains a collection of Recipient objects for an Outlook item.

UserProperties - Contains UserProperty objects that represent the custom properties of an Outlook item.