FolderInfo.AddMapiMessageItem

FolderInfo.AddMapiMessageItem method

Adds the IMapiMessageItem object into folder.

public string AddMapiMessageItem(IMapiMessageItem item)
ParameterTypeDescription
itemIMapiMessageItemThe item necessary to add.

Return Value

The string that represents the EntryId of the added item.

Exceptions

exceptioncondition
NotImplementedExceptionthrows, if a PST file version is ANSI.
ArgumentNullExceptionthrows, if an item to add is null.
InvalidOperationExceptionthrows, if a PST is open for reading only.
NotSupportedExceptionThrown when MessageClass doesn’t belong to IPM.Note, IPM.StickyNote, IPM.Contact, IPM.Activity, IPM.Appointment, IPM.Schedule.meeting, IPM.Task.
InvalidOperationExceptionThrown when MessageClass doesn’t correspond to the folder’s ContainerClass.

See Also