Platform SDK: CDO 1.2.1 |
The procedure documented in this section demonstrates, first, the old way to move message properties using the Messages collection’s Add method and the Message object’s Delete method, and then how to take advantage of the newer MoveTo method of the Message object.
Note With CDO Library version 1.0, the Message object’s Sender property and other read-only properties of the Message object were not preserved during the first part of the procedure in this section. To preserve these properties using the old procedure, you had to append their text fields to read/write properties, such as the Message object’s Text property.
With the MoveTo method, every property that is set on a Message object is automatically moved to the new Message object, regardless of whether it has read-only or read/write access. The access of every property is also preserved across the copy.
To move a message from one folder to another
– Or –
For more details on this procedure and a sample code fragment, see Copying a Message to Another Folder. The comment lines at the end of the first copy procedure contain the call to delete the original message:
' If MOVING a message to another folder, delete the original message: objThisMsg.Delete ' Move operation implies that the original message is removed
This Delete call is not necessary if the MoveTo method is used.