Loncat ke daftar isi utama

Bagaimana cara mencetak semua lampiran dalam satu / beberapa email di Outlook?

Seperti yang Anda ketahui, itu hanya akan mencetak konten email seperti header, body ketika Anda mengklik File > Mencetak di Microsoft Outlook, tetapi tidak mencetak lampiran. Di sini kami akan menunjukkan kepada Anda cara mencetak semua lampiran dalam email yang dipilih dengan mudah di Microsoft Outlook.


Cetak semua lampiran dalam satu pesan email satu per satu

Microsoft Outlook memberi kami Cetak cepat fitur, yang dapat membantu Anda mencetak lampiran dalam pesan email satu per satu.

1. Pilih pesan email yang lampirannya akan Anda cetak nanti.

2. Klik satu lampiran di email ini.

3. klik Cetak cepat tombol di tindakan kelompok di lampiran Tab.

Catatan: Alat Lampiran tidak akan diaktifkan sampai Anda mengklik lampiran di email.

4. Dialog Opening Mail Attachment keluar, dan silahkan klik Open .

Harap dicatat bahwa langkah ini akan membuka lampiran yang dipilih, dan mencetak lampiran yang dipilih ini pada waktu yang bersamaan.

Untuk mencetak lampiran lain di email ini, ulangi Langkah 2 hingga Langkah 4.

Cepat simpan / ekspor semua lampiran dari beberapa email di Outlook

Biasanya kita dapat menyimpan lampiran dari satu email dengan mengaktifkan Alat Lampiran dan menerapkan Simpan Semua Lampiran fitur di Outlook. Tapi, bagaimana jika menyimpan lampiran dari beberapa email, atau dari seluruh folder email di Outlook? Coba Kutools for Outlook's Simpan semua Fitur (Lampiran).


simpan lampiran di beberapa email kto9

Batch mencetak semua lampiran dalam satu pesan email

Jika ada banyak lampiran dalam satu pesan email, akan memakan waktu lama untuk mencetaknya satu per satu. Dan metode berikut akan memandu Anda melalui pencetakan batch semua lampiran dalam pesan email yang dipilih dengan mudah.

1. Pilih pesan email yang lampirannya akan Anda cetak nanti.

2. Di Outlook 2010 atau versi yang lebih baru, klik File > Mencetak > Opsi Cetak. Lihat screenshot berikut:

3. Di kotak dialog Cetak, silakan centang Cetak file terlampir. Lampiran hanya akan dicetak ke printer default pilihan dalam Opsi cetak bagian.

4. klik Mencetak .

5. Pada kotak dialog Opening Mail Attachment yang muncul, klik Open tombol untuk melanjutkan. (Note: Kotak dialog ini akan muncul untuk setiap lampiran secara terpisah.)

Sekarang semua lampiran dalam pesan email yang dipilih ini akan dicetak sekaligus.


Cetak batch semua lampiran dan gambar dalam beberapa email yang dipilih

Untuk mencetak semua lampiran di beberapa email serta semua gambar di badan pesan di Outlook, ikuti langkah-langkah di bawah ini untuk menerapkan kode VBA.

1. Di milis, harap tunggu Ctrl or perubahan kunci untuk memilih beberapa email yang lampirannya akan Anda cetak.

2. tekan lain + F11 bersama untuk membuka jendela Microsoft Visual Basic for Applications.

3. Di jendela Microsoft Visual Basic for Applications, klik Ya Tools > Referensi. Dan kemudian periksa Runtime Microsoft Scripting pilihan seperti yang ditunjukkan di bawah ini. Setelah selesai, klik OK.

4. Klik Menyisipkan > Modul, lalu tempel kode VBA di bawah ini ke jendela modul baru.

VBA: Cetak semua lampiran di beberapa email 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. tekan F5 atau klik Run tombol untuk menjalankan kode VBA ini. Sekarang Anda akan melihat bahwa semua lampiran di email yang dipilih dan gambar di badan pesan dicetak.

Catatan:

  • Setiap gambar akan memunculkan kotak dialog pop-up untuk meminta konfirmasi pencetakan. Sedangkan jenis file lainnya akan langsung dicetak.
  • Jika ada gambar dalam tanda tangan email, mereka juga akan memunculkan kotak dialog pop-up.
  • Jika kamu dapatkan Makro dalam proyek ini dinonaktifkan kesalahan, silakan periksa tutorial ini: Bagaimana Cara Mengaktifkan Dan Menonaktifkan Macro Di Outlook?

Cetak batch semua lampiran dalam beberapa email yang dipilih kecuali gambar di badan

Untuk hanya mencetak lampiran di beberapa email tetapi gambar di badan pesan di Outlook, ikuti langkah-langkah di bawah ini untuk menerapkan kode VBA.

1. Di milis, harap tunggu Ctrl or perubahan kunci untuk memilih beberapa email yang lampirannya akan Anda cetak.

2. tekan lain + F11 bersama untuk membuka jendela Microsoft Visual Basic for Applications.

3. Di jendela Microsoft Visual Basic for Applications, klik Ya Tools > Referensi. Dan kemudian periksa Runtime Microsoft Scripting pilihan seperti yang ditunjukkan di bawah ini. Setelah selesai, klik OK.

4. Klik Menyisipkan > Modul, lalu tempel kode VBA di bawah ini ke jendela modul baru.

VBA: Cetak semua lampiran di beberapa email 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. tekan F5 atau klik Run tombol untuk menjalankan kode VBA ini. Sekarang Anda akan melihat bahwa semua lampiran dalam email yang dipilih dicetak.

Catatan:

  • Setiap gambar terlampir akan memunculkan kotak dialog pop-up untuk meminta Anda konfirmasi pencetakan. Sedangkan jenis file lainnya akan langsung dicetak.
  • Gambar di badan pesan tidak akan dicetak.
  • Jika kamu dapatkan Makro dalam proyek ini dinonaktifkan kesalahan, silakan periksa tutorial ini: Bagaimana Cara Mengaktifkan Dan Menonaktifkan Macro Di Outlook?

 


Demo: cetak satu atau semua lampiran di email Outlook


jenis: Dalam video ini, Kutools tab ditambahkan oleh Kutools untuk Outlook. Jika Anda membutuhkannya, silakan klik di sini untuk mendapatkan uji coba gratis 60 hari tanpa batasan!


Alat Produktivitas Kantor Terbaik

Kutools untuk Outlook - Lebih dari 100 Fitur Canggih untuk Meningkatkan Outlook Anda

🤖 Asisten Surat AI: Email profesional instan dengan keajaiban AI--satu klik untuk mendapatkan balasan jenius, nada sempurna, penguasaan multibahasa. Ubah email dengan mudah! ...

📧 Email Otomatis: Di Luar Kantor (Tersedia untuk POP dan IMAP)  /  Jadwal Kirim Email  /  Auto CC/BCC Sesuai Aturan Saat Mengirim Email  /  Penerusan Otomatis (Aturan Lanjutan)   /  Tambah Salam Otomatis   /  Secara Otomatis Membagi Email Multi-Penerima menjadi Pesan Individual ...

📨 email Management: Mengingat Email dengan Mudah  /  Blokir Email Penipuan berdasarkan Subjek dan Lainnya  /  Hapus Email Duplikat  /  Pencarian  /  Konsolidasi Folder ...

📁 Lampiran ProPenyimpanan Batch  /  Pelepasan Batch  /  Kompres Batch  /  Penyimpanan otomatis   /  Lepaskan Otomatis  /  Kompres Otomatis ...

🌟 Antarmuka Ajaib: 😊Lebih Banyak Emoji Cantik dan Keren   /  Tingkatkan Produktivitas Outlook Anda dengan Tampilan Tab  /  Minimalkan Outlook Daripada Menutup ...

👍 Keajaiban sekali klik: Balas Semua dengan Lampiran Masuk  /   Email Anti-Phishing  /  🕘Tampilkan Zona Waktu Pengirim ...

👩🏼‍🤝‍👩🏻 Kontak & Kalender: Batch Tambahkan Kontak Dari Email yang Dipilih  /  Bagi Grup Kontak menjadi Grup Individual  /  Hapus Pengingat Ulang Tahun ...

Lebih 100 Fitur Tunggu Eksplorasi Anda! Klik Di Sini untuk Menemukan Lebih Banyak.

 

 

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