PersonalStorage.MoveItem

MoveItem(MessageInfo, FolderInfo)

Moves a specified message to a new folder within the current pst.

public void MoveItem(MessageInfo message, FolderInfo newFolder)
ParameterTypeDescription
messageMessageInfoThe message to move.
newFolderFolderInfoThe new folder for the message.

Exceptions

exceptioncondition
ArgumentNullExceptionThrown when message is null.
ArgumentNullExceptionThrown when new folder is null.
NotImplementedExceptionThrown when attempting to edit the ANSI file version.

See Also


MoveItem(FolderInfo, FolderInfo)

Moves a specified folder to a new parent folder within the current pst.

public void MoveItem(FolderInfo folder, FolderInfo newFolder)
ParameterTypeDescription
folderFolderInfoThe folder to move.
newFolderFolderInfoThe new parent folder.

Exceptions

exceptioncondition
ArgumentNullExceptionThrown when message is null.
ArgumentNullExceptionThrown when new folder is null.
NotImplementedExceptionThrown when attempting to edit the ANSI file version.
InvalidOperationExceptionThrown when there is an attempt to move the root folder, which is not a valid operation because a root folder should maintain its position in the hierarchy.
InvalidOperationExceptionThrown when there is an attempt to move a folder into itself.
InvalidOperationExceptionThrown when there is an attempt to move a folder into one of its own subfolders.

See Also