Vai al contenuto principale

Come stampare tutti gli allegati in una / più e-mail in Outlook?

Come sai, stamperà solo il contenuto dell'email come intestazione, corpo quando fai clic su Compila il > Stampa in Microsoft Outlook, ma non stampare gli allegati. Qui ti mostreremo come stampare facilmente tutti gli allegati in un'e-mail selezionata in Microsoft Outlook.


Stampa tutti gli allegati in un messaggio di posta elettronica uno per uno

Microsoft Outlook ci fornisce Stampa veloce funzione, che può aiutarti a stampare gli allegati in un messaggio di posta elettronica uno per uno.

1. Seleziona il messaggio e-mail di cui stamperai gli allegati in seguito.

2. Fare clic su un allegato in questa email.

3. Clicca il Stampa veloce nel pulsante Azioni gruppo sul allegati scheda.

Notare la Strumenti per gli allegati non verrà attivato finché non fai clic sugli allegati nelle e-mail.

4. Viene visualizzata una finestra di dialogo di apertura dell'allegato di posta e fare clic su Apri pulsante.

Tieni presente che questo passaggio aprirà l'allegato selezionato e allo stesso tempo stamperà l'allegato selezionato.

Per stampare altri allegati in questa e-mail, ripetere i passaggi da Passaggio 2 a Passaggio 4.

Salva / esporta rapidamente tutti gli allegati da più email in Outlook

Normalmente possiamo salvare gli allegati da un'e-mail attivando il file Strumenti per gli allegati e applicando il Salva tutti gli allegati funzionalità in Outlook. Ma cosa succede se si salvano allegati da più e-mail o dall'intera cartella di posta in Outlook? Prova Kutools per Outlook Salva tutto Funzione (Allegati).


salva gli allegati in più email kto9

Stampa in batch tutti gli allegati in un messaggio di posta elettronica

Se ci sono molti allegati in un messaggio di posta elettronica, sarà necessario molto tempo per stamparli uno per uno. E il seguente metodo ti guiderà attraverso la stampa in batch di tutti gli allegati in un messaggio di posta elettronica selezionato facilmente.

1. Seleziona il messaggio e-mail di cui stamperai gli allegati in seguito.

2. In Outlook 2010 o versioni successive, fare clic su Compila il > Stampa > Opzioni di stampa. Vedi lo screenshot seguente:

3. Nella finestra di dialogo Stampa, controlla il Stampa i file allegati. Gli allegati verranno stampati solo sulla stampante predefinita opzione nel Opzioni di stampa .

4. Clicca il Stampa pulsante.

5. Nella finestra di dialogo Apertura allegato di posta che si apre, fare clic su Apri pulsante per andare avanti. (Note:: Questa finestra di dialogo verrà visualizzata separatamente per ogni allegato.)

Ora tutti gli allegati in questo messaggio e-mail selezionato verranno stampati contemporaneamente.


Stampa in batch tutti gli allegati e le immagini in più e-mail selezionate

Per stampare tutti gli allegati in più e-mail e tutte le immagini nel corpo del messaggio in Outlook, segui i passaggi seguenti per applicare un codice VBA.

1. Nella mailing list, tieni premuto Ctrl or Shift tasti per selezionare più messaggi di posta elettronica i cui allegati verranno stampati.

2. stampa altro + F11 tasti insieme per aprire la finestra di Microsoft Visual Basic, Applications Edition.

3. Nella finestra di Microsoft Visual Basic, Applications Edition, fare clic su Strumenti > Riferimenti. E poi controlla il file Runtime di script Microsoft opzione come mostrato di seguito. Una volta terminato, fare clic OK.

4. Clic inserire > Moduli, quindi incolla sotto il codice VBA nella finestra del nuovo modulo.

VBA: stampa tutti gli allegati in più email di 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. Stampa F5 o fare clic su Correre pulsante per eseguire questo codice VBA. Ora vedrai che tutti gli allegati nelle e-mail selezionate e le immagini nel corpo del messaggio vengono stampati.

Nota:

  • Ogni immagine farà apparire una finestra di dialogo pop-up per chiederti la conferma della stampa. Mentre altri tipi di file verranno stampati direttamente.
  • Se sono presenti immagini in una firma e-mail, verranno visualizzate anche finestre di dialogo a comparsa.
  • Se ottieni Le macro in questo progetto sono disabilitate errore, controlla questo tutorial: Come abilitare e disabilitare le macro in Outlook?

Stampa in batch tutti gli allegati in più e-mail selezionate tranne le immagini nel corpo

Per stampare solo gli allegati in più e-mail ma le immagini nel corpo del messaggio in Outlook, segui i passaggi seguenti per applicare un codice VBA.

1. Nella mailing list, tieni premuto Ctrl or Shift tasti per selezionare più messaggi di posta elettronica i cui allegati verranno stampati.

2. stampa altro + F11 tasti insieme per aprire la finestra di Microsoft Visual Basic, Applications Edition.

3. Nella finestra di Microsoft Visual Basic, Applications Edition, fare clic su Strumenti > Riferimenti. E poi controlla il file Runtime di script Microsoft opzione come mostrato di seguito. Una volta terminato, fare clic OK.

4. Clic inserire > Moduli, quindi incolla sotto il codice VBA nella finestra del nuovo modulo.

VBA: stampa tutti gli allegati in più email di 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. Stampa F5 o fare clic su Correre pulsante per eseguire questo codice VBA. Ora vedrai che tutti gli allegati nelle e-mail selezionate vengono stampati.

Nota:

  • Ciascuna immagine allegata farà apparire una finestra di dialogo pop-up per chiederti la conferma della stampa. Mentre altri tipi di file verranno stampati direttamente.
  • Le immagini nel corpo del messaggio non verranno stampate.
  • Se ottieni Le macro in questo progetto sono disabilitate errore, controlla questo tutorial: Come abilitare e disabilitare le macro in Outlook?

 


Demo: stampa uno o tutti gli allegati in un'e-mail di Outlook


Consiglio: In questo video, Kutools la scheda viene aggiunta da Kutools for Outlook. Se ne hai bisogno, fai clic su qui per avere una prova gratuita di 60 giorni senza limitazioni!


I migliori strumenti per la produttività in ufficio

Kutools for Outlook - Oltre 100 potenti funzionalità per potenziare il tuo Outlook

🤖 Assistente di posta AI: E-mail istantanee professionali con la magia dell'intelligenza artificiale: risposte geniali con un solo clic, tono perfetto, padronanza multilingue. Trasforma l'e-mail senza sforzo! ...

???? Automazione di posta elettronica: Fuori sede (disponibile per POP e IMAP)  /  Pianifica l'invio di e-mail  /  CC/BCC automatico in base alle regole durante l'invio di e-mail  /  Inoltro automatico (regole avanzate)   /  Aggiunta automatica di saluto   /  Suddividi automaticamente le email con più destinatari in singoli messaggi ...

📨 gestione e-mail: Richiama facilmente le email  /  Blocca le email truffe per soggetto e altri  /  Elimina email duplicate  /  Ricerca avanzata  /  Consolidare cartelle ...

📁 Allegati ProSalvataggio in batch  /  Stacca batch  /  Comprimi in lotti  /  Salvataggio automatico   /  Scollegamento automatico  /  Comprimi automaticamente ...

🌟 Magia dell'interfaccia: 😊Più emoji carini e fantastici   /  Aumenta la tua produttività in Outlook con le visualizzazioni a schede  /  Riduci a icona Outlook invece di chiuderlo ...

👍 Meraviglie con un clic: Rispondi a tutti con gli allegati in arrivo  /   E-mail anti-phishing  /  🕘Mostra il fuso orario del mittente ...

👩🏼‍🤝‍👩🏻 Contatti e calendario: Aggiungi in batch contatti dalle email selezionate  /  Dividere un gruppo di contatti in singoli gruppi  /  Rimuovi promemoria compleanno ...

Al di sopra Caratteristiche 100 Attendi la tua esplorazione! Clicca qui per scoprire di più.

 

 

Comments (24)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Is it possible to specify a network printer instead of always printing with the standard printer?
This comment was minimized by the moderator on the site
Dear all,

I had tried the VBA and the code runs but many popups are opening on screen to print images from the mail signature (apparently this is considered an attachment). Anyone knows how to solve it?

S.
This comment was minimized by the moderator on the site
If you don't want to print pictures in the body of a message, please use the code below:
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
This comment was minimized by the moderator on the site
Dear Amanda,

Thank you for the code. It worked!

S.
This comment was minimized by the moderator on the site
Hi there,

Sorry that printing images will bring up popups. You will have to confirm each to download all the images. If you don't need to print images, please click Cancel.

Amanda
This comment was minimized by the moderator on the site
I am using Microsoft 365 and this worked after deleting line 9. Thanks! This has saved a bit of time for me.
Rated 5 out of 5
This comment was minimized by the moderator on the site
hallo, ich möchte nur den Anhang der Mails von der angegebenen Adresse senden, wie kann ich das machen, danke
This comment was minimized by the moderator on the site
Vielen, vielen Dank dafür! Hat uns enorm viel Arbeit erspart.Auch ich musste - wie bereits in den Kommentaren geschrieben - die neunte Zeile "Dim xAttachment As Outlook.Attachment On Error Resume Next" entfernen, dann lief der Code einfandfrei durch.
This comment was minimized by the moderator on the site
Hi, this worked fine for me yesterday but now it is saying 'the macros in this project are disabled' Any advice how to enable them? 
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
on line 9 , removing "On Error Resume Next" worked for me.
This comment was minimized by the moderator on the site
Hi everyone, we updated the VBA code in the tutorial on 2022/08/03. If you still need to print all attachments, please check the new code. 😊
This comment was minimized by the moderator on the site
Hi, I have been using this shortcut for a few weeks now, printing all attachments from multiple emails at once, and I have recently been having to remove line 9 as Nilanka said, which has been working, but this no longer works. Im getting the warning box saying the macros in this project are disabled.....and so on... if someone has a solution to make this work as it has been prior to now, please lmk, as i am selecting about 60 emails all containing attachments to print. Thanks
This comment was minimized by the moderator on the site
This comment was minimized by the moderator on the site
Thank you 
This comment was minimized by the moderator on the site
yes this just worked for me as well. Thank you!
This comment was minimized by the moderator on the site
the VBA code gives syntax is error
This comment was minimized by the moderator on the site
if a pdf has the same name the macro prints just one pdf, how can i change the code in order to modify the pdf name?
This comment was minimized by the moderator on the site
if you want to print all attachments together in 1 email here's what you do. first make a folder on your desktop....I named mine "print". go to the email with the attachments....highlight all of the attachments, right click, save all attachments to the print folder. Open the print folder.....highlight all of them.....right click.....print.



now if only I could figure out how to print all the attachments in 200 emails without opening each one and printing it.
This comment was minimized by the moderator on the site
Kutools for Outlook's Detach All (Attachments) feature can help you download all attachments from multiple emails with several clicks! https://www.extendoffice.com/product/kutools-for-outlook/outlook-detach-attachments.html
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations