Skip to main content

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.


Best Office Productivity Tools

Kutools for Outlook - Over 100 Powerful Features to Supercharge Your Outlook

πŸ€– AI Mail Assistant: Instant pro emails with AI magic--one-click to genius replies, perfect tone, multilingual mastery. Transform emailing effortlessly! ...

πŸ“§ Email Automation: Out of Office (Available for POP and IMAP)  /  Schedule Send Emails  /  Auto CC/BCC by Rules When Sending Email  /  Auto Forward (Advanced Rules)   /  Auto Add Greeting   /  Automatically Split Multi-Recipient Emails into Individual Messages ...

πŸ“¨ Email Management: Easily Recall Emails  /  Block Scam Emails by Subjects and Others  /  Delete Duplicate Emails  /  Advanced Search  /  Consolidate Folders ...

πŸ“ Attachments ProBatch Save  /  Batch Detach  /  Batch Compress  /  Auto Save   /  Auto Detach  /  Auto Compress ...

🌟 Interface Magic: 😊More Pretty and Cool Emojis   /  Boost Your Outlook Productivity with Tabbed Views  /  Minimize Outlook Instead of Closing ...

πŸ‘ One-click Wonders: Reply All with Incoming Attachments  /   Anti-Phishing Emails  /  πŸ•˜Show Sender's Time Zone ...

πŸ‘©πŸΌβ€πŸ€β€πŸ‘©πŸ» Contacts & Calendar: Batch Add Contacts From Selected Emails  /  Split a Contact Group to Individual Groups  /  Remove Birthday Reminders ...

Over 100 Features Await Your Exploration! Click Here to Discover More.

Read More       Free Download      Purchase
 

 

Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations