Conversation.GetAlwaysDelete (Outlook)

Returns a constant in the OlAlwaysDeleteConversation enumeration that indicates whether all new items that join the conversation are always moved to the Deleted Items folder in the specified delivery store. Possible return values are olAlwaysDelete - New items of the conversation are always moved to the Deleted Items folder for the store that contains the items, olAlwaysDeleteUnsupported - The specified store does not support the action of always moving items to the Deleted Items folder of that store, olDoNotDelete - New items joining the conversation are not moved to the Deleted Items folder on the specified delivery store, and existing conversation items in the Deleted Items folder are moved to the Inbox.

If the Store parameter specifies a non-delivery store such as an archive .pst store, the GetAlwaysDelete method returns a constant from OlAlwaysDeleteConversation that applies to conversation items in the default delivery store. Items on a non-delivery store are not moved to the Deleted Items folder for the default delivery store. If GetAlwaysDelete returns olAlwaysDelete, items of the conversation are always moved to the Deleted Items folder for the store that contains the items. In a cross-store conversation, items are moved to the Deleted Items folder for the store that contains the items. When GetAlwaysDelete returns olAlwaysDelete, the GetAlwaysMoveToFolder method returns a folder object that represents the Deleted Items folder for the default store. If GetAlwaysDelete returns olAlwaysDeleteUnsupported, the specified store does not support the action of always moving items to the Deleted Items folder of that store. If GetAlwaysDelete returns olDoNotDelete, new items that arrive in the conversation are not moved to the Deleted Items folder on the specified delivery store, and existing conversation items in the Deleted Items folder are moved to the Inbox.

GetAlwaysDelete (Store)

Store: Specifies the store that holds the Deleted Items folder to which items of the conversation are moved.


Sub DemoGetAlwaysDelete() 
 
 Dim oMail As Outlook.MailItem 
 
 Dim oConv As Outlook.Conversation 
 
 Dim oStore As Outlook.Store 
 
 Dim intValue As Integer 
 
 
 
 ' Get the item displayed in Reading Pane. 
 
 Set oMail = ActiveExplorer.Selection(1) 
 
 
 
 If Application.Session.DefaultStore.IsConversationEnabled Then 
 
 Set oConv = oMail.GetConversation 
 
 If Not (oConv Is Nothing) Then 
 
 intValue = _ 
 
 oConv.GetAlwaysDelete(Application.session.DefaultStore) 
 
 If intValue = _ 
 
 Outlook.OlAlwaysDeleteConversation.olAlwaysDelete Then 
 
 Debug.Print "olAlwaysDelete" 
 
 ElseIf intValue = _ 
 
 Outlook.OlAlwaysDeleteConversation.olAlwaysDeleteUnsupported Then 
 
 Debug.Print "olAlwaysDeleteUnsupported" 
 
 ElseIf intValue = _ 
 
 Outlook.OlAlwaysDeleteConversation.olDoNotDelete Then 
 
 Debug.Print "olDoNotDelete" 
 
 End If 
 
 End If 
 
 End If 
 
End Sub