CopyTo Method

This method is implemented by the following interfaces. Click one of the links below to jump to the description of the method as it pertains to that interface.

IERUItem
IERUDBRow

 

 

CopyTo method

Copies the item to another location.

Syntax


C++

HRESULT CopyTo(
   IERUItem* Destination,

   BSTR NewName,

   LONG CopyFlags,

   IERUItem** ppRetVal)

Scripting languages

Set item = Object.CopyTo(
   Destination as IERUItem,

   NewName as String,

   CopyFlags as Long)

Parameters


Destination

The destination item that this item should be copied into.

NewName

The name to give the new copy. If empty, the name of the new copy will be the same as the original with the words "Copy of" prepended. [optional, default = empty string].

CopyFlags

One or more values from the ERUCopyFlag enum, logically OR'ed together. [optional, default = erCopyFlagNone].

RetVal

Upon return, contains an IERUItem interface pointer to the new copy.

Return value


C++

The return code.

Scripting languages

Upon return, contains an IERUItem interface pointer to the new copy.

Remarks


All items contained within the item identified by pItemToCopy are also copied. You can copy items within a single Room, or from one room to another in the same Facility, but not across Facilities.

If copying across rooms and the Open/Edit access lists or the Route access list of the source Item contains members from the source room who are not members in the target room, they are removed from that access list.

If the access scope is erScopeList and this procedure results in the removal of all members from the access list, the access scope will revert to erCoordinatorsOnly.

Note that:

  • Not all item types can be copied.

  • Not all item types can be copied into.

  • Some item types cannot be copied into some other item types (e.g. you can't copy a Poll into a Comment).

If the Item's name is not unique in the destination container and the value erCopyFlagMakeNameUnique is not included in the CopyFlags parameter, the error EROOM_E_DUPLICATE name is returned.

If the source or the target objects do not support copying, or the combination of the two is not supported, this method returns EROOM_E_INVALIDOPERATION. This method replaces IERUContainer::Copy.

Home

Applies to

IERUItem

 

 

Go to Top

 

CopyTo method

Copies a row to another database or within the same database.

Syntax


C++

HRESULT CopyTo(
   IERUItem* pTarget,

   IERUItem** ppRetVal)

Scripting languages

Set item = Object.CopyTo(
   Target as IERUItem)

Parameters


Target

The Database you want to copy the Database Row into. Specifying NULL (C++) or Nothing (VB) will copy the row within its current database.

RetVal

Upon return, contains an IERUItem interface pointer to the new copy.

Return value


C++

The return code.

Scripting languages

Upon return, contains an IERUItem interface pointer to the new copy.

Go to Top

Home

Applies to

IERUDBRow