Hoppa till huvudinnehåll

Hur skriver jag ut alla bilagor i en / flera e-postmeddelanden i Outlook?

Som du vet kommer det bara att skriva ut e-postinnehållet som rubrik, body när du klickar på Fil > Skriva ut i Microsoft Outlook, men skriv inte ut bilagorna. Här visar vi dig hur du skriver ut alla bilagor i ett valt e-postmeddelande i Microsoft Outlook.


Skriv ut alla bilagor i ett e-postmeddelande en efter en

Microsoft Outlook ger oss Snabbutskrift funktion, som kan hjälpa dig att skriva ut bilagor i ett e-postmeddelande en efter en.

1. Välj e-postmeddelandet vars bilagor du kommer att skriva ut senare.

2. Klicka på en bilaga i det här e-postmeddelandet.

3. Klicka på Snabbutskrift knapp i Handlingar grupp på bilagor fliken.

Notera Tillbehörsverktyg aktiveras inte förrän du klickar på bilagor i e-postmeddelanden.

4. En dialogruta för att öppna e-postbilaga kommer ut och klicka på Öppen knapp.

Observera att detta steg öppnar den valda bilagan och skriver ut den valda bilagan samtidigt.

Upprepa steg 2 till steg 4 för att skriva ut andra bilagor i det här e-postmeddelandet.

Spara / exportera snabbt alla bilagor från flera e-postmeddelanden i Outlook

Normalt kan vi spara bilagor från ett e-postmeddelande genom att aktivera Tillbehörsverktyg och tillämpa Spara alla bilagor funktion i Outlook. Men vad händer om du sparar bilagor från flera e-postmeddelanden eller från hela e-postmappen i Outlook? Prova Kutools för Outlook Spara alla (Bilagor) -funktion.


spara bilagor i flera e-postmeddelanden kto9

Gruppera ut alla bilagor i ett e-postmeddelande

Om det finns många bilagor i ett e-postmeddelande kommer det att vara tidskrävande att skriva ut dem en efter en. Och följande metod kommer att leda dig genom att enkelt skriva ut alla bilagor i ett valt e-postmeddelande.

1. Välj e-postmeddelandet vars bilagor du kommer att skriva ut senare.

2. I Outlook 2010 eller senare versioner, klicka på Fil > Skriva ut > Utskriftsalternativ. Se följande skärmdump:

3. Kontrollera i dialogrutan Skriv ut Skriv ut bifogade filer. Bilagor skrivs endast ut till standardskrivaren alternativet i Utskriftsalternativ sektion.

4. Klicka på Skriva ut knapp.

5. Klicka på på i dialogrutan Öppning av bifogad e-post Öppen knappen för att gå vidare. (Anmärkningar: Den här dialogrutan dyker upp för varje bilaga separat.)

Nu kommer alla bilagor i detta valda e-postmeddelande att skrivas ut på en gång.


Batchskriv ut alla bilagor och bilder i flera utvalda e-postmeddelanden

För att skriva ut alla bilagor i flera e-postmeddelanden samt alla bilder i meddelandetexten i Outlook, följ stegen nedan för att tillämpa en VBA-kod.

1. Håll i e-postlistan ctrl or shift för att välja flera e-postmeddelanden vars bilagor du skriver ut.

2. Tryck andra + F11 för att öppna Microsoft Visual Basic for Applications-fönstret.

3. Klicka på i Microsoft Visual Basic for Applications-fönstret verktyg > Referensprojekt. Och kolla sedan Microsoft Scripting Runtime alternativ som visas nedan. När du är klar klickar du OK.

4. Klicka Insert > Modulernaoch klistra sedan in under VBA-koden i det nya modulfönstret.

VBA: Skriv ut alla bilagor i flera Outlook-e-postmeddelanden

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. Tryck F5 eller klicka på Körning knappen för att köra denna VBA-kod. Nu kommer du att se att alla bilagor i de valda mejlen och bilderna i meddelandetexten skrivs ut.

Notera:

  • Varje bild kommer att få upp en popup-dialogruta för att be om bekräftelse på utskriften. Medan andra typer av filer kommer att skrivas ut direkt.
  • Om det finns bilder i en e-postsignatur kommer de också att visa popup-dialogrutor.
  • Om du får Makron i det här projektet är inaktiverade fel, kolla denna handledning: Hur aktiverar och inaktiverar du makron i Outlook?

Batchskriv ut alla bilagor i flera utvalda e-postmeddelanden utom bilder i brödtexten

För att bara skriva ut bilagor i flera e-postmeddelanden men bilderna i meddelandetexten i Outlook, följ stegen nedan för att tillämpa en VBA-kod.

1. Håll i e-postlistan ctrl or shift för att välja flera e-postmeddelanden vars bilagor du skriver ut.

2. Tryck andra + F11 för att öppna Microsoft Visual Basic for Applications-fönstret.

3. Klicka på i Microsoft Visual Basic for Applications-fönstret verktyg > Referensprojekt. Och kolla sedan Microsoft Scripting Runtime alternativ som visas nedan. När du är klar klickar du OK.

4. Klicka Insert > Modulernaoch klistra sedan in under VBA-koden i det nya modulfönstret.

VBA: Skriv ut alla bilagor i flera Outlook-e-postmeddelanden

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. Tryck F5 eller klicka på Körning knappen för att köra denna VBA-kod. Nu kommer du att se att alla bilagor i de valda mejlen skrivs ut.

Notera:

  • Varje bifogad bild kommer att ta upp en popup-dialogruta för att be om bekräftelse på utskrift. Medan andra typer av filer kommer att skrivas ut direkt.
  • Bilder i meddelandetexten kommer inte att skrivas ut.
  • Om du får Makron i det här projektet är inaktiverade fel, kolla denna handledning: Hur aktiverar och inaktiverar du makron i Outlook?

 


Demo: skriv ut en eller alla bilagor i ett Outlook-e-postmeddelande


Tips: I denna video, Kutools fliken läggs till av Kutools för Outlook. Klicka på om du behöver det här. att ha en 60-dagars gratis testperiod utan begränsning!


Bästa kontorsproduktivitetsverktyg

Kutools för Outlook - Över 100 kraftfulla funktioner för att överladda din Outlook

🤖 AI Mail Assistant: Instant proffs-e-postmeddelanden med AI-magi – ett klick för geniala svar, perfekt ton, flerspråkig behärskning. Förvandla e-post utan ansträngning! ...

📧 Email Automation: Frånvaro (tillgänglig för POP och IMAP)  /  Schemalägg Skicka e-post  /  Auto CC/BCC enligt regler när du skickar e-post  /  Automatisk vidarebefordran (avancerade regler)   /  Lägg automatiskt till hälsning   /  Dela automatiskt e-postmeddelanden med flera mottagare i individuella meddelanden ...

📨 Email Management: Hämta enkelt e-postmeddelanden  /  Blockera bluff-e-postmeddelanden av ämnen och andra  /  Ta bort duplicerade e-postmeddelanden  /  Avancerad Sökning  /  Konsolidera mappar ...

📁 Bilagor ProBatch Spara  /  Batch lossa  /  Batchkomprimera  /  Automatisk sparning   /  Auto Lossa  /  Automatisk komprimering ...

🌟 Gränssnittsmagi: 😊 Fler vackra och coola emojis   /  Öka din Outlook-produktivitet med flikar  /  Minimera Outlook istället för att stänga ...

👍 Underverk med ett klick: Svara alla med inkommande bilagor  /   E-postmeddelanden mot nätfiske  /  🕘Visa avsändarens tidszon ...

👩🏼‍🤝‍👩🏻 Kontakter och kalender: Lägg till kontakter i grupp från valda e-postmeddelanden  /  Dela upp en kontaktgrupp till individuella grupper  /  Ta bort påminnelser om födelsedag ...

Över 100 funktioner Vänta på din utforskning! Klicka här för att upptäcka mer.

Läs mer       Gratis nedladdning      Inköp
 

 

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