_AppointmentItem.CopyTo Method
Copies the AppointmentItem to the folder that is specified by the DestinationFolder parameter and returns an object that represents the item created in the destination folder by the copy operation.
Namespace: Microsoft.Office.Interop.Outlook
Assembly: Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)
Syntax
'Declaration
<DispIdAttribute()> _
Function CopyTo ( _
DestinationFolder As MAPIFolder, _
CopyOptions As OlAppointmentCopyOptions _
) As AppointmentItem
'Usage
Dim instance As _AppointmentItem
Dim DestinationFolder As MAPIFolder
Dim CopyOptions As OlAppointmentCopyOptions
Dim returnValue As AppointmentItem
returnValue = instance.CopyTo(DestinationFolder, _
CopyOptions)
[DispIdAttribute()]
AppointmentItem CopyTo(
MAPIFolder DestinationFolder,
OlAppointmentCopyOptions CopyOptions
)
Parameters
DestinationFolder
Type: Microsoft.Office.Interop.Outlook.MAPIFolderSpecifies the folder to which the AppointmentItem object is copied.
CopyOptions
Type: Microsoft.Office.Interop.Outlook.OlAppointmentCopyOptionsSpecifies the user experience of the copy operation.
Return Value
Type: Microsoft.Office.Interop.Outlook.AppointmentItem
Returns an AppointmentItem objectthat represents the object created in the destination folder as a result of the copy operation.
Remarks
If no argument is specified for the CopyOptions parameter, CopyTo assumes that the value is olCreateAppointment.
CopyTo returns an error if the destination folder is not an appropriate folder type for an AppointmentItem object, or if the user does not have the necessary permissions to create items in the specified destination folder.
Setting the REG_MULTI_SZ value, DisableCrossAccountCopy, in HKCU\Software\Microsoft\Office\14.0\Outlook in the Windows registry has the side effect of disabling this method.