I have an Outlook macro that marks as read and moves all messages in the thread to another folder. I assigned a macro to the Archive button. However, I cannot βundoβ this action. If I
- delete message
- Archive message
- Cancel
As a result, I delete the message. I thought I would not translate the message. If I move the message by dragging it to another folder, the cancellation works as I expect. Here's a macro, does anyone know why this does not support undo?
Sub ArchiveConversation() Set ArchiveFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders("Archive") Set Conversations = ActiveExplorer.Selection.GetSelection(Outlook.OlSelectionContents.olConversationHeaders) For Each Header In Conversations Set Items = Header.GetItems() For i = 1 To Items.Count Items(i).UnRead = False Items(i).Move ArchiveFolder Next i Next Header End Sub
Or do I need to code support for cancellation?
source share