_Conversation.SetAlwaysMoveToFolder(MAPIFolder, Store) Method

Definition

Sets a Folder object that indicates the folder to which all existing conversation items and new items that arrive in the conversation are always moved.

public:
 void SetAlwaysMoveToFolder(Microsoft::Office::Interop::Outlook::MAPIFolder ^ MoveToFolder, Microsoft::Office::Interop::Outlook::Store ^ Store);
public void SetAlwaysMoveToFolder (Microsoft.Office.Interop.Outlook.MAPIFolder MoveToFolder, Microsoft.Office.Interop.Outlook.Store Store);

Parameters

MoveToFolder
MAPIFolder

Specifies the folder to which all existing items and new items that arrive in the conversation are always moved.

Store
Store

A Store object that represents the store that contains the folder to which items of the conversation are moved.

Remarks

The SetAlwaysMoveToFolder method operates on conversation items in the delivery store specified by the Store parameter. If the Store parameter represents a non-delivery store such as an archive .pst store, the move action will apply to conversation items in the default delivery store.

If the MoveToFolder parameter specifies an invalid folder that does not exist, has been moved, or is read-only, Outlook will raise an error.

To stop the always-move-to-folder action for conversations items in a store, call the StopAlwaysMoveToFolder(Store) method

Note: Setting the Deleted Items folder as the MoveToFolder parameter in SetAlwaysMoveToFolder is not equivalent to calling SetAlwaysDelete(OlAlwaysDeleteConversation, Store) on the same store and conversation. Setting the MoveToFolder parameter to the Deleted Items folder results in the GetAlwaysDelete(Store) method returning the value olDoNotDelete.

The BeforeItemMove event of the Folder object occurs when you call SetAlwaysMoveToFolder.

Applies to