Skip to main content

如何在Outlook中批量將多封郵件轉換為PDF文件?

Author: Sun Last Modified: 2025-05-12

在Outlook中,「另存為」功能只能將郵件保存為HTML、TXT、MHT、MSG和模板格式的文件。如果你想將郵件轉換為PDF文件,該怎麼辦呢?本文介紹了一些解決這個問題的小技巧。

使用列印功能將一封郵件轉換為PDF文件

使用「另存為文件」工具將多封郵件批量轉換為單獨的PDF文件good idea3

使用VBA將一封郵件轉換為PDF文件


使用列印功能將一封郵件轉換為PDF文件

在Outlook中,你可以使用列印功能將一封郵件保存為PDF文件。

1. 選擇要轉換為PDF的郵件,點擊「檔案」>「列印」,從「印表機」下拉列表中選擇「Microsoft Print to PDF」,然後點擊「列印」

doc batch convert email to pdf 1

2. 在「另存列印輸出為」對話框中,選擇一個路徑來放置文件,並給它命名。

batch-convert-email-to-pdf-with-print

3. 點擊「保存」,然後點擊「取消」以停止列印。

batch-convert-email-to-pdf-with-print

現在,選中的郵件已經被轉換為PDF文件。

注意:此方法僅適用於Outlook 2016。


Outlook中的AI郵件助理:更聰明的回覆,更清晰的溝通(一鍵奇蹟!) 免費

使用Kutools for Outlook的AI郵件助理簡化您的日常Outlook任務。這個強大的工具會從您過去的郵件中學習,提供智能且準確的答覆,優化您的郵件內容,並幫助您輕鬆起草和潤色郵件。
doc ai email handle

此功能支援:

  • 智能回覆:根據您過去的對話獲得量身定制、精確且隨時可用的回覆。
  • 增強內容:自動優化您的郵件文字以提高清晰度和影響力。
  • 輕鬆撰寫:只需提供關鍵字,讓AI處理其餘部分,並有多種寫作風格可供選擇。
  • 智能擴展:通過上下文感知建議來拓展您的思路。
  • 摘要生成:即時獲取長郵件的簡潔概述。
  • 全球觸及:輕鬆將您的郵件翻譯成任何語言。

此功能支援:

  • 智能郵件回覆
  • 優化的內容
  • 基於關鍵字的草稿
  • 智能內容擴展
  • 郵件摘要生成
  • 多語言翻譯

最重要的是,此功能永遠完全免費不要再等待了——立即下載AI郵件助理並享受吧


使用「另存為文件」工具將多封郵件批量轉換為單獨的PDF文件

使用上述方法,你一次只能將一封郵件保存為PDF文件。如果你想批量將多封郵件轉換為單獨的PDF文件,可以嘗試Kutools for Outlook的「將選中郵件另存為各種格式(如PDF)文件」工具。

 ? Kutools for Outlook 現在有免費版本,其 70+ 功能終身免費。立即下載免費版本

免費安裝 Kutools for Outlook,然後按照以下步驟操作:

1. 選擇要轉換的郵件,然後點擊「Kutools」>「批量處理」>「將選中郵件另存為各種格式(如PDF)文件」

click-save-selected-messages-as-files

2. 在「 將郵件另存為其他文件」對話框中,選擇一個路徑來存放文件,並勾選PDF格式選項,你可以在右側部分勾選有關保存內容的選項。

save-as-pdf-with-kto

3. 點擊「確定」。

現在,這些郵件已經被轉換為PDF文件。

save-as-pdf-with-kto
 

使用VBA將一封郵件轉換為PDF文件

如果你正在使用Outlook 2007或2010,可以應用VBA代碼將一封郵件轉換為PDF文件。

1. 選擇一封郵件,按下Alt + F11鍵以啟用Microsoft Visual Basic for Applications窗口。

2. 點擊「插入」>「模塊」,並將以下代碼粘貼到模塊腳本中。

VBA:將郵件轉換為PDF

Sub SaveAsPDFfile()
'UpdatebyExtendoffice
Dim MyOlNamespace As NameSpace
Dim MySelectedItem As MailItem
Dim Response As String
Dim FSO As Object, TmpFolder As Object
Dim tmpFileName As String
Dim wrdApp As Object
Dim wrdDoc As Object
Dim bStarted As Boolean
Dim dlgSaveAs As FileDialog
Dim fdfs As FileDialogFilters
Dim fdf As FileDialogFilter
Dim i As Integer
Dim WshShell As Object
Dim SpecialPath As String
Dim msgFileName As String
Dim strCurrentFile As String
Dim strName As String
Dim oRegEx As Object
Dim intPos As Long
Set MyOlNamespace = Application.GetNamespace("MAPI")
Set MySelectedItem = ActiveExplorer.Selection.Item(1)
Set FSO = CreateObject("Scripting.FileSystemObject")
tmpFileName = FSO.GetSpecialFolder(2)
strName = "email_temp.mht"
tmpFileName = tmpFileName & "\" & strName
MySelectedItem.SaveAs tmpFileName, 10
On Error Resume Next
Set wrdApp = GetObject(, "Word.Application")
If Err Then
Set wrdApp = CreateObject("Word.Application")
bStarted = True
End If
On Error GoTo 0
Set wrdDoc = wrdApp.Documents.Open(FileName:=tmpFileName, Visible:=False, Format:=7)
Set dlgSaveAs = wrdApp.FileDialog(msoFileDialogSaveAs)
Set fdfs = dlgSaveAs.Filters
i = 0
For Each fdf In fdfs
i = i + 1
If InStr(1, fdf.Extensions, "pdf", vbTextCompare) > 0 Then
Exit For
End If
Next fdf
dlgSaveAs.FilterIndex = i
Set WshShell = CreateObject("WScript.Shell")
SpecialPath = WshShell.SpecialFolders(16)
msgFileName = MySelectedItem.Subject
Set oRegEx = CreateObject("vbscript.regexp")
oRegEx.Global = True
oRegEx.Pattern = "[\/:*?""<>|]"
msgFileName = Trim(oRegEx.Replace(msgFileName, ""))
dlgSaveAs.InitialFileName = SpecialPath & "\" & msgFileName
If dlgSaveAs.Show = -1 Then
strCurrentFile = dlgSaveAs.SelectedItems(1)
If Right(strCurrentFile, 4) <> ".pdf" Then
Response = MsgBox("Sorry, only saving in the pdf-format is supported." & _
vbNewLine & vbNewLine & "Save as pdf instead?", vbInformation + vbOKCancel)
If Response = vbCancel Then
wrdDoc.Close 0
If bStarted Then wrdApp.Quit
Exit Sub
ElseIf Response = vbOK Then
intPos = InStrRev(strCurrentFile, ".")
If intPos > 0 Then
strCurrentFile = Left(strCurrentFile, intPos - 1)
End If
strCurrentFile = strCurrentFile & ".pdf"
End If
End If
wrdApp.ActiveDocument.ExportAsFixedFormat OutputFileName:= _
strCurrentFile, _
ExportFormat:=17, _
OpenAfterExport:=False, _
OptimizeFor:=0, _
Range:=0, _
From:=0, _
To:=0, _
Item:=0, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=0, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
End If
Set dlgSaveAs = Nothing
wrdDoc.Close
If bStarted Then wrdApp.Quit
Set MyOlNamespace = Nothing
Set MySelectedItem = Nothing
Set wrdDoc = Nothing
Set wrdApp = Nothing
Set oRegEx = Nothing
End Sub

3. 按下F5鍵以啟用「文件保存」對話框,選擇一個文件夾來存放文件並給它命名。

batch-convert-email-to-pdf-5

4. 點擊「保存」。

提示:如果代碼無法運行,你可以嘗試進入「信任中心」檢查「宏設置」部分中的「啟用所有宏」選項。

batch-convert-email-to-pdf-6