Class MapiCalendar

MapiCalendar class

Represents a MAPI calendar item.

public sealed class MapiCalendar : MapiMessageItemBase

Constructors

NameDescription
MapiCalendar()Initializes a new instance of the MapiCalendar class
MapiCalendar(string, string, string, DateTime, DateTime)Initializes a new instance of the MapiCalendar class.
MapiCalendar(string, string, string, DateTime, DateTime, MapiElectronicAddress, MapiRecipientCollection)Initializes a new instance of the MapiCalendar class.
MapiCalendar(string, string, string, DateTime, DateTime, string, MapiRecipientCollection)Initializes a new instance of the MapiCalendar class.

Properties

NameDescription
AppointmentCounterProposal { get; set; }Gets or sets a value indicating whether a Meeting Response object is a counter proposal.
Attachments { get; }Gets the attachment collection.
Attendees { get; set; }Gets or sets the attendees
Billing { get; set; }Contains the billing information associated with an item.
Body { get; set; }Gets the message text.
BodyHtml { get; }Gets the BodyRtf of the message converted to HTML, if present, otherwise an empty string.
BodyRtf { get; set; }Gets or sets the RTF formatted message text.
BodyType { get; }Gets the type of the body.
BusyStatus { get; set; }Gets or sets the busy status
Categories { get; set; }Contains keywords or categories for the message object.
ClientIntent { get; set; }Gets or sets the actions the user has taken on this Meeting object.
virtual CodePage { get; }Gets the code page.
Companies { get; set; }Contains the names of the companies that are associated with an item.
EndDate { get; set; }Gets or sets the end date and time of the event. If the date is not set, default value for DateTime is returned.
EndDateTimeZone { get; set; }Gets or sets time zone information that indicates the time zone of the EndDate property
IsAllDay { get; set; }Gets or sets a value indicating whether the event is an all-day event
virtual ItemId { get; }The item id, uses with a server
KeyWords { get; set; }Gets or sets the categories of the calendar object
Location { get; set; }Gets or sets the location of the event
MessageClass { get; set; }Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message.
Mileage { get; set; }Contains the mileage information that is associated with an item.
NamedProperties { get; }Gets the named properties of message.
NamedPropertyMapping { get; }Gets the named property mapping.
Organizer { get; set; }Gets or sets the organizer.
virtual Properties { get; }Gets the collection of properties.
PropertyStream { get; }Gets the property stream.
Recipients { get; set; }Gets the recipients of the message.
Recurrence { get; set; }Gets or sets the recurrence properties
ReminderDelta { get; set; }Gets or sets the interval, in minutes, between the time at which the reminder first becomes overdue and the start time of the Calendar object
ReminderFileParameter { get; set; }Specifies the full path of the sound that a client SHOULD play when the reminder becomes overdue.
ReminderSet { get; set; }Gets or sets a value indicating whether a reminder is set on the object
Sensitivity { get; set; }Gets the Sensitivity.
Sequence { get; set; }Gets or sets the sequence number
StartDate { get; set; }Gets or sets the start date and time of the event. If the date is not set, default value for DateTime is returned.
StartDateTimeZone { get; set; }Gets or sets time zone information that indicates the time zone of the StartDate property
Subject { get; set; }Gets or sets the subject of the message.
SubjectPrefix { get; }Gets a subject prefix that typically indicates some action on a message, such as “FW: " for forwarding.
SubStorages { get; }Gets the sub storages.
SupportedType { get; }Gets the supported item type.
Uid { get; set; }Gets the unique identifier

Methods

NameDescription
override Dispose()Releases all resources.
override GetProperty(PropertyDescriptor)Gets MAPI property by property descriptor.
GetPropertyBoolean(long)Gets the value of the property specified by tag as Boolean type.
GetPropertyBytes(long)Gets the string value of the property specified by tag.
GetPropertyDateTime(long)Gets the value of the property specified by tag as DateTime type.
GetPropertyInt32(long)Gets the int32 value of the property specified by tag.
GetPropertyLong(long)Gets the value of the property specified by tag as Long (int64) type.
GetPropertyShort(long)Gets the value of the property specified by tag as Short type.
GetPropertyString(long)Gets the string value of the property specified by tag.
GetPropertyString(long, int)Gets the string value of the property specified by tag.
GetUnderlyingMessage()Retrieves the underlying MapiMessage object.
IsStoreUnicodeOk()Determines if string properties are Unicode encoded or not.
RemoveProperty(long)Provides correctly removing property from all collections.
Save(Stream)Saves calendar object to the file with iCalendar format using te default save options
Save(string)Saves calendar object to the file with iCalendar format using te default save options
Save(Stream, AppointmentSaveFormat)Saves calendar object to the stream with specified format using te default save options
Save(Stream, MapiCalendarSaveOptions)Saves calendar to the stream with specified save options
Save(string, AppointmentSaveFormat)Saves calendar object to the file with specified format using te default save options
Save(string, MapiCalendarSaveOptions)Saves calendar object to the file with specified format using te default save options
virtual SetBodyContent(string, BodyContentType)Sets the content of the body.
virtual SetBodyContent(string, BodyContentType, bool)Sets the content of the body.
SetBodyRtf(string, bool)Gets or sets the RTF formatted message text.
SetMessageFlags(MapiMessageFlags)Sets the message flags.
virtual SetProperty(MapiProperty)Sets the property.
override SetProperty(PropertyDescriptor, object)Sets MAPI property.
TryGetPropertyData(long)Try to get the property data with specified tag key.
TryGetPropertyDateTime(long, ref DateTime)Gets the value of the specified property as DateTime type. A return value indicates whether the operation succeeded.
TryGetPropertyInt32(long, ref int)Gets the value of the specified property as Int32 type. A return value indicates whether the operation succeeded.
TryGetPropertyLong(long, ref long)Gets the value of the specified property as Long type. A return value indicates whether the operation succeeded.
TryGetPropertyString(long)Try to get a property data as string with specified tag.
TryGetPropertyString(long, int)Try to get a property data as string with specified tag and code page.
TryGetPropertyString(long, ref string)Gets the value of the specified property as String type. A return value indicates whether the operation succeeded.
TryGetPropertyString(long, ref string, int)Gets the value of the specified property as String type. A return value indicates whether the operation succeeded.

Remarks

This class serves as a wrapper for MapiMessage to simplify the process of handling calendar information from MAPI properties. It provides a more intuitive interface for accessing and manipulating calendar data within the MAPI message.

Examples

The following example demonstrates how to get a MapiCalendar object from a MapiMessage.

[C#]

var msg = MapiMessage.Load("calendar.msg");

// Check if the loaded message is a supported calendar type
if (msg.SupportedType == MapiItemType.Calendar)
{
    // Convert the MAPI message to a MapiCalendar object
    var mapiCalendar = (MapiCalendar)msg.ToMapiMessageItem();
    
    // Display some calendar info
    Console.WriteLine(mapiCalendar.Subject);
    Console.WriteLine(mapiCalendar.StartDate);
}

[Visual Basic]

Dim msg = MapiMessage.Load("calendar.msg")

' Check if the loaded message is a supported calendar type
If msg.SupportedType = MapiItemType.Calendar Then
    ' Convert the MAPI message to a MapiCalendar object
    Dim mapiCalendar = DirectCast(msg.ToMapiMessageItem(), MapiCalendar)
    
    ' Display some calendar info
    Console.WriteLine(mapiCalendar.Subject)
    Console.WriteLine(mapiCalendar.StartDate)
End If

See Also