Note: The other languages of the website are Google-translated. Back to English
English English

Come convertire in batch più email in file pdf in Outlook?

In Outlook, la funzione Salva con nome può salvare solo un'e-mail come file in formato HTML, TXT, MHT, MSG e modello, se desideri convertire le e-mail in file PDF, come puoi fare? In questo articolo, introduco alcuni trucchi per risolvere questo problema.

Converti un'e-mail in file PDF con la funzione di stampa

Converti un'e-mail in file PDF con VBA

Converti email batch in file PDF separati con l'utilità Salva come filebuona idea 3


Converti un'e-mail in file PDF con la funzione di stampa

In Outlook, puoi utilizzare la funzione Stampa per salvare un'e-mail come file PDF.

1. Selezionare l'e-mail che si desidera convertire in PDF, fare clic su File > Stampa, Selezionare Microsoft Print to PDF dal Printer elenco a discesa e fare clic su Print.
doc batch converte email in pdf 1

2. Nel Save Print Output As finestra di dialogo, selezionare un percorso per posizionare il file e assegnargli un nome.
doc batch converte email in pdf 2

3. Clic Savee fare clic Cancel per interrompere la stampa.
doc batch converte email in pdf 3

Ora il messaggio selezionato è stato convertito in un file PDF.

Note:: Questo metodo funziona solo in Outlook 2016.


Converti un'e-mail in file PDF con VBA

Se stai lavorando su Outlook 2007 o 2010, puoi applicare un codice VBA per convertire un'e-mail in un file PDF.

1. Selezionare un'e-mail e premere Alt + F11 tasti per abilitare il Microsoft Visual Basic for Applications finestra.

2. Clic Insert > Modulee incolla il codice sottostante nel file Module script.

VBA: converti e-mail in 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

doc batch convert email to pdf 4

3. Press F5 key to enable File Save dialog, select a folder to place the file and give it a name.
doc batch convert email to pdf 5

4. Click Save.

Tip: If the code cannot run, you may try to go to Trust Center to check the Enable all macros option in Macro Settings section.
doc batch convert email to pdf 6


Convert batch emails to separated PDF files with Save as File utility

With above methods, you only can save one message as a PDF file at a time, if you want to batch convert multiple emails to separated PDF files, you can try Kutools for Outlook’s Bulk Save utility.

Kutools for Outlook, Includes 100 powerful features and tools for Microsoft Outlook 2016, 2013, 2010 and Office 365.

Free install Kutools for Outlook, and then do as below steps:

1. Select the emails you want to convert, and then click Kutools > Bulk Save.
doc batch convert email to pdf 7

2. In the Save message as other files dialog, select a path to locate the file, and check PDF format option, you can check the options about saving contents in right section.
doc batch convert email to pdf 8

3. Click Ok.

Now the emails have been converted to PDF files.
doc batch convert email to pdf 10


Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations