跳至主要内容

如何在Outlook中删除当前正在编辑的草稿而不删除原始邮件?

Author: Siluvia Last Modified: 2025-05-07

Microsoft Outlook 2013及更高版本默认在阅读窗格中打开邮件回复。假设您正在回复一封邮件,3分钟后Outlook会自动将回复保存为草稿。但随后您决定不发送此回复并删除该草稿。一些Outlook用户倾向于点击“主页”选项卡下的“删除”按钮以从阅读窗格中删除草稿(见下图)。但此操作也会删除原始邮件。

delete the currently edited draft without deleting the original email in Outlook

在本教程中,我们提供了两个VBA代码,帮助您在快速访问工具栏上添加两个命令,以便在Outlook中快速删除当前正在编辑的草稿而不删除原始邮件。

删除阅读窗格中当前正在编辑的草稿
在新窗口中删除当前正在编辑的草稿


删除阅读窗格中当前正在编辑的草稿

如果您习惯于在阅读窗格中回复邮件,可以应用以下VBA代码来删除当前正在编辑的草稿而不删除Outlook中的原始邮件。

1. 启动您的Outlook,按Alt + F11键打开Microsoft Visual Basic for Applications窗口。

2. 在Microsoft Visual Basic for Applications窗口中,双击Project1 > Microsoft Outlook Objects > ThisOutlookSession以打开ThisOutlookSession (Code)窗口。然后将以下VBA代码复制到代码窗口中。

delete the currently edited draft without deleting the original email in Outlook

VBA代码:删除阅读窗格中当前正在编辑的草稿

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. 保存代码并按Alt + Q键关闭Microsoft Visual Basic for Applications窗口。

现在,您需要一个按钮来运行宏。

4. 点击自定义快速访问工具栏 > 更多命令。

delete the currently edited draft without deleting the original email in Outlook

5. 在Outlook选项对话框中,您需要进行如下配置。

5.1) 在“从以下位置选择命令”下拉列表中,选择宏;
5.2) 选择您在上一步中添加的宏;
5.3) 点击添加按钮,将此宏添加到自定义快速访问工具栏框中。
delete the currently edited draft without deleting the original email in Outlook

6. 在右侧框中保持脚本选中状态,然后点击修改按钮。在修改按钮对话框中,为脚本分配一个新按钮并点击确定。

delete the currently edited draft without deleting the original email in Outlook

7. 在Outlook选项对话框中点击确定以保存更改。

您在第6步中指定的按钮将被添加到快速访问工具栏中。

delete the currently edited draft without deleting the original email in Outlook

8. 重新启动Outlook以激活代码。

从现在开始,当在阅读窗格中回复邮件时,您可以通过点击快速访问工具栏上的按钮删除回复及其草稿。

注意:运行脚本后,您需要在邮件列表中选择另一封邮件以刷新当前文件夹中的邮件视图。


Outlook中的AI邮件助手:更智能的回复,更清晰的沟通(一键搞定!) 免费

使用Kutools for Outlook的AI邮件助手简化您的日常Outlook任务。这一强大工具会从您过去的邮件中学习,提供智能化且精准的回复建议,优化您的邮件内容,并帮助您轻松起草和润色邮件。
doc ai email handle

该功能支持:

  • 智能回复:根据您以往的对话生成量身定制、精准且即用的回复。
  • 增强内容:自动优化您的邮件文本,使其更加清晰且有影响力。
  • 轻松撰写:只需提供关键字,AI即可完成其余工作,并支持多种写作风格。
  • 智能扩展:通过上下文感知的建议扩展您的思路。
  • 总结概括:快速获取长邮件的简洁概述。
  • 全球覆盖:轻松将您的邮件翻译成任何语言。

该功能支持:

  • 智能邮件回复
  • 优化后的内容
  • 基于关键字的草稿
  • 智能内容扩展
  • 邮件总结
  • 多语言翻译

最重要的是,此功能永久完全免费不要再犹豫了——立即下载AI邮件助手并体验吧


a name="a2"> 在新窗口中删除当前正在编辑的草稿

如果您喜欢在新窗口中回复邮件。以下VBA代码可以帮助您轻松地在Outlook中删除回复邮件及其草稿。

1. 启动您的Outlook,按Alt + F11键打开Microsoft Visual Basic for Applications窗口。

2. 点击插入 > 模块。然后将以下VBA代码复制到模块窗口中。

delete the currently edited draft without deleting the original email in Outlook
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. 按Alt + F11关闭Microsoft Visual Basic for Applications窗口。

现在,您需要一个按钮来运行宏。

4. 点击主页 > 新建邮件以创建新邮件。在消息窗口中,点击自定义快速访问工具栏 > 更多命令。

5. 然后重复上述步骤5至7,为脚本创建一个按钮并将其添加到消息窗口的快速访问工具栏中。

从现在开始,当在新消息窗口中回复邮件时,您可以通过点击快速访问工具栏上的按钮删除此回复及其草稿。

delete the currently edited draft without deleting the original email in Outlook