# vceCopyMessageText

Copies the associated message text data from one voice message to another voice message.

#### Prototype

DWORD vceCopyMessageText ( VCEHD srcvh, unsigned srcmsg, VCEHD destvh, unsigned destmsg)

Argument | Description
srcvh | Voice handle of the source VOX file.
srcmsg | Source message number.
destvh | Voice handle of the destination VOX file.
destmsg | Destination message number.

#### Return values

Return value | Description
SUCCESS |
CTAERR_DISK_FULL | There is not enough room on the disk to complete the write operation. No data was written.
CTAERR_FILE_READ_FAILED | File system error.
CTAERR_FILE_WRITE_FAILED | File system error.
CTAERR_INVALID_HANDLE | A voice handle is invalid, or source and destination message numbers belong to different contexts.
CTAERR_SVR_COMM | Server communication error.
VCEERR_INVALID_MESSAGE | Source message number or destination message number is not in the valid range for VOX files (0 to 32767).
VCEERR_OUT_OF_INDICES | No free header entries in the destination VOX file.
VCEERR_PLAY_ONLY | Destination voice file is not open for record.
VCEERR_WRONG_FILE_TYPE | Source or destination is not a VOX file.

#### Details

vceCopyMessageText copies the message text for message srcmsg in the VOX file denoted by srcvh to message number destmsg in the VOX file denoted by destvh. If message text for destmsg already exists, it is replaced.

Source and destination voice handles must belong to the same context. They can be the same handle.

To copy all message text from the source file to the destination file, set the source message and the destination message to VCE_ALL_MESSAGES. This setting replaces all message text in the destination file.

vceCopyMessageText does not affect the current message for the context.

To copy a voice message, use vceCopyMessage.

#### See also

vceReadMessageText, vceWriteMessageText

#### Example

/*
* Copy a message and its associated text from one .VOX file to another */
void myCopyPrompt (VCEHD destvh, VCEHD srcvh, unsigned message)
{
vceCopyMessage (srcvh, message, destvh, message);
vceCopyMessageText(srcvh, message, destvh, message);
}