跳至主要内容

如何在Outlook中一次性发送多个草稿?

Author: Xiaoyang Last Modified: 2025-07-31

如果您的草稿文件夹中有多个草稿邮件,现在您想一次性发送它们,而不是逐个发送。那么在Outlook中如何快速轻松地处理这项任务呢?

使用VBA代码在Outlook中一次性发送所有草稿邮件


使用VBA代码在Outlook中一次性发送所有草稿邮件

以下VBA代码可以帮助您一次性从草稿文件夹中发送所有或选中的草稿邮件,请按照以下步骤操作:

1. 按住 ALT + F11 键打开 Microsoft Visual Basic for Applications 窗口。

2. 然后点击 插入 > 模块,将以下代码复制并粘贴到打开的空白模块中,见截图:

VBA代码:在Outlook中一次性发送所有草稿邮件:

Sub SendAllDraftEmails()
Dim xAccount As Account
Dim xDraftFld As Folder
Dim xItemCount As Integer
Dim xCount As Integer
Dim xDraftsItems As Outlook.Items
Dim xPromptStr As String
Dim xYesOrNo As Integer
Dim i As Long
Dim xCurFld As Folder
Dim xTmpFld As Folder
On Error Resume Next
xItemCount = 0
xCount = 0
Set xTmpFld = Nothing
Set xCurFld = Application.ActiveExplorer.CurrentFolder
For Each xAccount In Outlook.Application.Session.Accounts
    Set xDraftFld = xAccount.DeliveryStore.GetDefaultFolder(olFolderDrafts)
    xItemCount = xItemCount + xDraftFld.Items.Count
    If xDraftFld.EntryID = xCurFld.EntryID Then
        Set xTmpFld = xCurFld.Parent
    End If
Next xAccount
Set xDraftFld = Nothing
If xItemCount > 0 Then
   xPromptStr = "Are you sure to send out all the drafts?"
    xYesOrNo = MsgBox(xPromptStr, vbQuestion + vbYesNo, "Kutools for Outlook")
    If xYesOrNo = vbYes Then
        If Not xTmpFld Is Nothing Then
            Set Application.ActiveExplorer.CurrentFolder = xTmpFld
        End If
        VBA.DoEvents
        For Each xAccount In Outlook.Application.Session.Accounts
            Set xDraftFld = xAccount.DeliveryStore.GetDefaultFolder(olFolderDrafts)
            Set xDraftsItems = xDraftFld.Items
            For i = xDraftsItems.Count To 1 Step -1
                If xDraftsItems.Item(i).Recipients.Count <> 0 Then
                    xDraftsItems.Item(i).sEnd
                    xCount = xCount + 1
                End If
            Next
        Next xAccount
        VBA.DoEvents
        Set Application.ActiveExplorer.CurrentFolder = xCurFld
        MsgBox "Successfully sent " & xCount & " messages", vbInformation, "Kutools for Outlook"
    End If
Else
    MsgBox "No Drafts!", vbInformation + vbOKOnly, "Kutools for Outlook"
End If
End Sub
steps on sendig all draft messages at once in Outlook with VBA code

3. 然后保存代码,并按 F5 键运行此代码,会弹出一个提示框询问您是否要发送所有草稿,点击,见截图:

steps on sendig all draft messages at once in Outlook with VBA code

4. 接着会弹出一个对话框,提醒您已发送了多少封草稿邮件,见截图:

steps on sendig all draft messages at once in Outlook with VBA code

5. 然后点击 确定 按钮,草稿文件夹中的所有邮件将一次性发送出去,见截图:

steps on sendig all draft messages at once in Outlook with VBA code

注意:

1. 上述代码将发送Outlook中所有帐户的所有草稿邮件。

2. 如果您只想发送草稿文件夹中的某些特定邮件,请使用以下VBA代码:

VBA代码:发送草稿文件夹中的选定邮件:

Sub SendSelectedDraftEmails()
Dim xSelection As Selection
Dim xPromptStr As String
Dim xYesOrNo As Integer
Dim i As Long
Dim xAccount As Account
Dim xCurFld As Folder
Dim xDraftsFld As Folder
Dim xTmpFld As Folder
Dim xArr() As String
Dim xCount As Integer
Dim xMail As MailItem
On Error Resume Next
xCount = 0
Set xTmpFld = Nothing
Set xCurFld = Application.ActiveExplorer.CurrentFolder
For Each xAccount In Outlook.Application.Session.Accounts
    Set xDraftsFld = xAccount.DeliveryStore.GetDefaultFolder(olFolderDrafts)
    If xDraftsFld.EntryID = xCurFld.EntryID Then
        Set xTmpFld = xCurFld.Parent
    End If
Next xAccount
If xTmpFld Is Nothing Then
    MsgBox "The current folder is not a draft folder", vbInformation, "Kutools for Outlook"
    Exit Sub
End If
Set xSelection = Outlook.Application.ActiveExplorer.Selection
If xSelection.Count > 0 Then
    xPromptStr = "Are you sure to send out the selected " & xSelection.Count & " draft item(s)?"
    xYesOrNo = MsgBox(xPromptStr, vbQuestion + vbYesNo, "Kutools for Outlook")
    If xYesOrNo = vbYes Then
        ReDim xArr(xSelection.Count - 1)
        For i = 1 To xSelection.Count
            xArr(i - 1) = xSelection.Item(i).EntryID
        Next
        Set Application.ActiveExplorer.CurrentFolder = xTmpFld
        VBA.DoEvents
        For i = 0 To UBound(xArr)
            Set xMail = Application.Session.GetItemFromID(xArr(i))
            If xMail.Recipients.Count <> 0 Then
                xMail.sEnd
                xCount = xCount + 1
            End If
        Next
        VBA.DoEvents
        Set Application.ActiveExplorer.CurrentFolder = xCurFld
        MsgBox "Successfully sent " & xCount & " messages", vbInformation, "Kutools for Outlook"
    End If
Else
    MsgBox "No items selected!", vbInformation, "Kutools for Outlook"
End If
End Sub

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

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

该功能支持:

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

该功能支持:

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

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


相关文章:

如何在Outlook中分别向多个收件人发送电子邮件?

如何通过Outlook从Excel列表发送个性化群发邮件?

如何在Outlook中分别向多个收件人发送日历?

如何在Outlook中向多个收件人发送邮件而不让他们知道?


最佳 Office 办公效率工具

重磅消息:Kutools for Outlook 推出免费版本!

体验全新 Kutools for Outlook 免费版,70 多个强大功能,永久免费使用!点击立即下载!

🤖 Kutools AI 利用先进的AI技术轻松处理邮件,包括答复、总结、优化、扩展、翻译和撰写邮件。

📧 邮件自动化自动答复(支持POP和IMAP) /计划发送邮件 /发送邮件时根据规则自动抄送密送 / 自动转发(高级规则) / 自动添加问候语 / 自动将群发邮件拆分为单独邮件 ...

📨 邮件管理撤回邮件 / 按主题等方式阻止诈骗邮件 / 删除重复邮件 / 高级搜索 / 整合文件夹 ...

📁 附件专家批量保存 / 批量拆离 / 批量压缩 / 自动保存 / 自动拆离 / 自动压缩 ...

🌟 界面魔法😊更多精美个性表情 /重要邮件来临时提醒您 / 最小化而非关闭 Outlook ...

👍 一键高效操作带附件全部答复 /反钓鱼邮件 / 🕘显示发件人时区 ...

👩🏼‍🤝‍👩🏻 联系人与日历从选中的邮件批量添加联系人 / 将联系人组拆分为多个独立组 / 移除生日提醒 ...

使用 Kutools,支持英语、西班牙语、德语、法语、中文及40 多种其他语言,满足您的语言偏好!

一键解锁 Kutools for Outlook。无需等待,立即下载,提升办公效率!

kutools for outlook features1 kutools for outlook features2