Note: The other languages of the website are Google-translated. Back to English

How to delete the currently edited draft without deleting the original email in Outlook?

Microsoft Outlook 2013 and later versions open email replies in the reading pane by default. Suppose you are replying to an email and after 3 minutes Outlook automatically saves the response as a draft. But then you decide not to send this reply and delete the draft along with it. Some Outlook users tend to click the Delete button under the Home tab to delete the draft from the Reading Pane (see screenshot below). But this action also deletes the original email.

In this tutorial, we provide two VBA codes to help you add two commands on the Quick Access Toolbar to quickly delete the currently edited draft without deleting the original email in Outlook.

Delete the currently edited draft in reading pane
Delete the currently edited draft in a new window


Delete the currently edit draft in reading pane

If you are used to replying to emails in the reading pane, you can apply the following VBA code to delete the currently edited draft without deleting the original email in Outlook.

1. Launch your Outlook, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, double click Project1 > Microsoft Outlook Objects > ThisOutlookSession to open the ThisOutlookSession (Code) window. Then copy the following VBA code to the Code window.

VBA code: Delete the currently edited draft in reading pane

Public WithEvents GExplorer As Explorer
'Updated by Extendoffice 20220713
Public WithEvents GInlineMail As MailItem
Private Sub Application_Startup()
  Set GExplorer = Application.ActiveExplorer
End Sub
Private Sub GExplorer_InlineResponse(ByVal Item As Object)
  Set GInlineMail = Item
End Sub
Sub InlineDiscard()
  On Error Resume Next
  If Not GInlineMail Is Nothing And Not GInlineMail.Sent Then
    GInlineMail.UnRead = False
    GInlineMail.Delete
  End If
  Set GInlineMail = Nothing
End Sub

3. Save the code and press the Alt + Q keys to close the Microsoft Visual Basic for Applications window.

Now you need a button to run the macro.

4. Click Customize Quick Access Toolbar > More Commands.

5. In the Outlook Options dialog box, you need to configure as follows.

5.1) In the Choose commands from drop-down list, select Macros;
5.2) Select the macro you added in the previous step;
5.3) Click the Add button to add this macro to the Customize Quick Access Toolbar box.

6. Keep the script selected in the right box, and then click the Modify button. In the Modify Button dialog box, assign a new button to the script and click OK.

7. Click OK in the Outlook Options dialog box to save the changes.

The button you specified in step 6 is then added to the Quick Access Toolbar.

8. Restart Outlook to activate the code.

From now on, when replying to an email in the reading pane, you can delete the reply along with the draft by clicking the button on the Quick Access Toolbar.

Note: After running the script, you need to select another email in the mailing list to refresh the mail view in the current folder.


Delete the currently edited draft in a new window

If you like to reply to emails in a new window. The following VBA code can help to delete the reply email along with the draft easily in Outlook.

1. Launch your Outlook, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module. Then copy the following VBA code to the Module window.

Sub DeleteDraftMessageWindow()
'Updated by Extendoffice 20220713
  Dim xInspector As Inspector
  Dim xMail As MailItem
  On Error Resume Next
  Set xInspector = Application.ActiveInspector
  If xInspector Is Nothing Then Exit Sub
  Set xMail = xInspector.CurrentItem
  If Not xMail.Sent Then
    xMail.UnRead = False
    xMail.Delete
  End If
End Sub

3. Press the Alt + F11 to close the Microsoft Visual Basic for Applications window.

Now you need a button to run the macro.

4. Click Home > New Email to create a new email. In the message window, click Customize Quick Access Toolbar > More Commands.

5. Then repeat the steps above from 5 to 7 to create a button for the script and add it to the Quick Access Toolbar of the message window.

From now on, when replying to an email in a new message window, you can delete this reply along with the draft by clicking the button on the Quick Access Toolbar.


Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations