如何在Outlook中打印一封或多封郵件中的所有附件?
眾所周知,當您在 Microsoft Outlook 中點擊文件 > 列印時,它只會列印郵件內容(例如郵件頭和正文),而不會列印附件。在此我們將向您展示如何輕鬆地在 Microsoft Outlook 中列印選定郵件中的所有附件。
逐個列印一封郵件中的所有附件
Microsoft Outlook 提供了快速列印功能,可以幫助您逐個列印郵件中的附件。
1. 選擇要稍後列印其附件的郵件。
2. 點擊該郵件中的一個附件。

3. 在「附件」標籤的「回覆」組中,點擊「快速列印」按鈕。

注意: 附件工具 只有當你點擊郵件中的附件時才會被啟用。
4. 出現一個「打開郵件附件」對話框,請點擊「打開 」按鈕。

請注意,此步驟將打開所選附件,並同時列印該附件。
要列印此郵件中的其他附件,請重複第 2 至第 4 步。
快速保存/導出Outlook中多封郵件的所有附件
通常,我們可以通過啟用「附件工具」 並應用Outlook中的 「保存所有附件」功能來保存單封郵件中的附件。但是,如果要從多封郵件或整個郵件文件夾中保存附件呢?試試Kutools for Outlook的「保存所有(附件)」功能。

批量列印一封郵件中的所有附件
如果一封郵件中有許多附件,逐個列印將非常耗時。以下方法將指導您輕鬆批量列印選定郵件中的所有附件。
1. 選擇要稍後列印其附件的郵件。
2. 在Outlook 2010或更高版本中,請點擊「文件」>「列印」>「列印選項」。見下圖:

3. 在「列印」對話框中,請勾選「列印附加文件。附件僅列印到預設印表機」選項,在「列印選項」部分。

4. 點擊「列印」按鈕。
5. 在彈出的「打開郵件附件」對話框中,請點擊「打開 」按鈕以繼續。(注意:此對話框將為每個附件分別彈出。)

現在,這封選定郵件中的所有附件將一次性列印出來。
批量列印多封選定郵件中的所有附件和圖片
要在Outlook中列印多封郵件中的所有附件以及正文中所有的圖片,請按照以下步驟應用VBA代碼。
1. 在郵件列表中,請按住Ctrl或Shift鍵選擇多封要列印其附件的郵件。
2. 同時按下 Alt + F11 鍵,打開Microsoft Visual Basic for Applications窗口。
3. 在Microsoft Visual Basic for Applications窗口中,點擊「工具」>「引用」。然後如下面所示勾選「Microsoft Scripting Runtime」選項。完成後,點擊「確定」。

4. 點擊「插入」>「模塊」,然後將以下VBA代碼粘貼到新模塊窗口中。
VBA:列印多封Outlook郵件中的所有附件
Sub PrintAllAttachmentsInMultipleMails()
'Update by ExtendOffice 2022/08/03
Dim xShellApp As Object
Dim xFSO As Scripting.FileSystemObject
Dim xItem As Object
Dim xTempFldPath, xFilePath As String
Dim xSelItems As Outlook.Selection
Dim xMailItem As Outlook.MailItem
Dim xAttachments As Outlook.Attachments
Dim xAttachment As Outlook.Attachment
Dim xFile As File
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
xTempFldPath = xFSO.GetSpecialFolder(2).Path & "\Attachments " & Format(Now, "yyyymmddhhmmss") 'xFSO.GetSpecialFolder(2) For saving temporary files
If xFSO.FolderExists(xTemfldpath) = False Then 'create temporary folder
xFSO.CreateFolder (xTempFldPath)
End If
Set xSelItems = Outlook.ActiveExplorer.Selection
Set xShellApp = CreateObject("Shell.Application")
For Each xItem In xSelItems
If xItem.Class = OlObjectClass.olMail Then
Set xMailItem = xItem
Set xAttachments = xMailItem.Attachments
For Each xAttachment In xAttachments
xFilePath = xTempFldPath & "\" & xAttachment.FileName
xAttachment.SaveAsFile (xFilePath)
Next
End If
Next
For Each xFile In xFSO.GetFolder(xTempFldPath).Files
VBA.DoEvents
Call xShellApp.ShellExecute(xFile.Path, "", "", "print", 0)
Next
Set xSelItems = Nothing
Set xShellApp = Nothing
Set xFSO = Nothing
End Sub
5. 按F5鍵或點擊「運行 」按鈕來運行此VBA代碼。現在您會看到選定郵件中的所有附件和正文中圖片都被列印出來。
注意:
- 每張圖片都會彈出一個對話框,要求您確認列印。而其他類型的文件將直接列印。
- 如果郵件簽名中有圖片,它們也會彈出對話框。
- 如果您收到「此項目中的宏已被禁用」錯誤,請查看本教程:如何在Outlook中啟用和禁用宏?
批量列印多封選定郵件中的所有附件,但不包括正文中圖片
要僅列印多封郵件中的附件,但不包括Outlook郵件正文中圖片,請按照以下步驟應用VBA代碼。
1. 在郵件列表中,請按住Ctrl或Shift鍵選擇多封要列印其附件的郵件。
2. 同時按下 Alt + F11 鍵,打開Microsoft Visual Basic for Applications窗口。
3. 在Microsoft Visual Basic for Applications窗口中,點擊「工具」>「引用」。然後如下面所示勾選「Microsoft Scripting Runtime」選項。完成後,點擊「確定」。

4. 點擊「插入」>「模塊」,然後將以下VBA代碼粘貼到新模塊窗口中。
VBA:列印多封Outlook郵件中的所有附件
Sub PrintAllAttachmentsInMultipleMails()
'Update by ExtendOffice 2022/08/05
Dim xShellApp As Object
Dim xFSO As Scripting.FileSystemObject
Dim xItem As Object
Dim xTempFldPath, xFilePath As String
Dim xSelItems As Outlook.Selection
Dim xMailItem As Outlook.MailItem
Dim xAttachments As Outlook.Attachments
Dim xAttachment As Outlook.Attachment
Dim xFile As File
On Error Resume Next
Set xFSO = New Scripting.FileSystemObject
xTempFldPath = xFSO.GetSpecialFolder(2).Path & "\Attachments " & Format(Now, "yyyymmddhhmmss") 'xFSO.GetSpecialFolder(2) For saving temporary files
If xFSO.FolderExists(xTemfldpath) = False Then 'create temporary folder
xFSO.CreateFolder (xTempFldPath)
End If
Set xSelItems = Outlook.ActiveExplorer.Selection
Set xShellApp = CreateObject("Shell.Application")
For Each xItem In xSelItems
If xItem.Class = OlObjectClass.olMail Then
Set xMailItem = xItem
Set xAttachments = xMailItem.Attachments
For Each xAttachment In xAttachments
If IsEmbeddedAttachment(xAttachment) = False Then
xFilePath = xTempFldPath & "\" & xAttachment.FileName
xAttachment.SaveAsFile (xFilePath)
Debug.Print xFilePath
End If
Next
End If
Next
For Each xFile In xFSO.GetFolder(xTempFldPath).Files
VBA.DoEvents
Call xShellApp.ShellExecute(xFile.Path, "", "", "print", 0)
Next
Set xSelItems = Nothing
Set xShellApp = Nothing
Set xFSO = Nothing
End Sub
Function IsEmbeddedAttachment(Attach As Attachment)
Dim xItem As MailItem
Dim xCid As String
Dim xID As String
Dim xHtml As String
On Error Resume Next
IsEmbeddedAttachment = False
Set xItem = Attach.Parent
If xItem.BodyFormat <> olFormatHTML Then Exit Function
xCid = ""
xCid = Attach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001F")
If xCid <> "" Then
xHtml = xItem.HTMLBody
xID = "cid:" & xCid
If InStr(xHtml, xID) > 0 Then
IsEmbeddedAttachment = True
End If
End If
End Function
5. 按F5鍵或點擊「運行」 按鈕來運行此VBA代碼。現在您會看到選定郵件中的所有附件都被列印出來。
注意:
- 每個附帶的圖片都會彈出一個對話框,要求您確認列印。而其他類型的文件將直接列印。
- 正文中圖片不會被列印。
- 如果您收到「此項目中的宏已被禁用」錯誤,請查看本教程:如何在Outlook中啟用和禁用宏?
演示:列印Outlook郵件中的一個或所有附件
最佳辦公室生產力工具
最新消息:Kutools for Outlook推出免費版本!
體驗全新的Kutools for Outlook免費版本,擁有70多項令人驚嘆的功能,永久使用!立即點擊下載!
🤖 Kutools AI :使用先進的AI技術輕鬆處理郵件,包括答覆、摘要、優化、擴展、翻譯和撰寫郵件。
📧 郵件自動化:自動回覆(適用於POP和IMAP) / 計劃發送郵件 / 發送郵件時按規則自動抄送密送 / 自動轉發(高級規則) / 自動新增問候語 / 自動將多收件人郵件拆分為個別郵件...
📨 郵件管理:撤回郵件 / 按主題和其他方式阻止詐騙郵件 / 刪除重複郵件 / 高級搜索 / 整合文件夾...
📁 附件專業版:批量保存 / 批量拆離 / 批量壓縮 / 自動保存 / 自動拆離 / 自動壓縮...
🌟 介面魔法:😊更多漂亮和酷炫的表情符号 / 當重要郵件到來時提醒您 / 最小化Outlook而不是關閉...
👍 一鍵奇蹟:帶附件全部答復 / 防止網絡釣魚郵件 / 🕘顯示發件人的時區...
👩🏼🤝👩🏻 聯絡人和日曆:從選中郵件批量新增聯絡人 / 將聯絡人組拆分為個別組 / 移除生日提醒...
立即單擊解鎖Kutools for Outlook。不要等待,立即下載並提升您的效率!

