ExchangeService.CreateItems method

Creates multiple items in a single Exchange Web Services (EWS) call.

Namespace:  Microsoft.Exchange.WebServices.Data
Assembly:  Microsoft.Exchange.WebServices (in Microsoft.Exchange.WebServices.dll)

'Declaration
Public Function CreateItems ( _
	items As IEnumerable(Of Item), _
	parentFolderId As FolderId, _
	messageDisposition As Nullable(Of MessageDisposition), _
	sendInvitationsMode As Nullable(Of SendInvitationsMode) _
) As ServiceResponseCollection(Of ServiceResponse)
'Usage
Dim instance As ExchangeService
Dim items As IEnumerable(Of Item)
Dim parentFolderId As FolderId
Dim messageDisposition As Nullable(Of MessageDisposition)
Dim sendInvitationsMode As Nullable(Of SendInvitationsMode)
Dim returnValue As ServiceResponseCollection(Of ServiceResponse)

returnValue = instance.CreateItems(items, _
	parentFolderId, messageDisposition, _
	sendInvitationsMode)

Parameters

items
Type: System.Collections.Generic.IEnumerable<Item>

The items to be created.

parentFolderId
Type: Microsoft.Exchange.WebServices.Data.FolderId

The ID of the folder in which the newly created items are to be placed. If this parameter is a null reference (Nothing in Visual Basic), items are created in their default folders.

messageDisposition
Type: System.Nullable<MessageDisposition>

One of the enumeration values that specifies the disposition mode for EmailMessage objects. This parameter is required for items that contain at least one EmailMessage instance.

sendInvitationsMode
Type: System.Nullable<SendInvitationsMode>

One of the enumeration values that specifies whether and how invitations should be sent for items of type Appointment. This parameter is required for items that contain at least one Appointment instance.

Return value

Type: Microsoft.Exchange.WebServices.Data.ServiceResponseCollection<ServiceResponse>
A collection of creation results for each of the specified items.

The CreateItems(IEnumerable<Item>, FolderId, Nullable<MessageDisposition>, Nullable<SendInvitationsMode>) method supports the EmailMessage, Appointment, Contact, PostItem, Task, and Item types. This method does not support items that have unsaved attachments.

Show: