Replace the specified message in the current message store.
Syntax
object.ReplaceMessage( [MessageIndex] )
Parameters
- MessageIndex
- An integer value which specifies the message that is to be
replaced in the message store. If this parameter is omitted, the
current message as specified by the value of the StoreIndex
property will be used.
Return Value
A value of zero is returned if the method succeeds.
Otherwise, a non-zero error code is returned which indicates the
cause of the failure.
Remarks
The ReplaceMessage method replaces the specified message
with a new message. The message number may be a message that has been
previously marked for deletion. It is important to note that the
change will not be reflected in the physical storage file until it
has been closed. This method will update the current message index in
the storage file.
The message store must be opened with write access. This method
will fail if you attempt to replace a message from a storage file
that has been opened for read-only access. If the application
needs to replace messages in the message store, it is recommended
that the file be opened for exclusive access using the
mimeStoreLock option when calling the OpenStore
method.
See Also
StoreCount Property,
StoreIndex Property,
DeleteMessage Method,
PurgeStore Method,
ReadStore Method,
WriteStore Method
|