Перейти до основного матеріалу

Як надрукувати всі вкладення в одному / декількох електронних листах в Outlook?

Як відомо, при друку вмісту електронної пошти, такого як заголовок, тіло, буде надруковано лише при натисканні філе > друк у Microsoft Outlook, але не друкувати вкладення. Тут ми покажемо вам, як легко роздрукувати всі вкладення у вибраному електронному листі в Microsoft Outlook.


Роздрукуйте всі вкладення в одному повідомленні електронної пошти по одному

Microsoft Outlook надає нам Швидкий друк функція, яка може допомогти вам роздрукувати вкладення в електронному повідомленні по одному.

1. Виберіть повідомлення електронної пошти, вкладення якого ви надрукуєте пізніше.

2. Клацніть одне вкладення в цьому електронному листі.

3. Натисніть Швидкий друк кнопка в Дії група на Attachments Вкладка.

Примітка: Інструменти кріплення не буде активовано, доки ви не клацнете вкладення в електронних листах.

4. З’явиться діалогове вікно «Відкрити вкладення до електронної пошти», і натисніть відкритий кнопки.

Зверніть увагу, що цей крок відкриє вибране вкладення та одночасно роздрукує цей вибраний вкладення.

Щоб надрукувати інші вкладення у цьому електронному листі, повторіть кроки 2 - 4.

Швидко зберігайте / експортуйте всі вкладення з декількох електронних листів в Outlook

Зазвичай ми можемо зберігати вкладення з одного електронного листа з активацією Інструменти кріплення і застосовуючи Зберегти всі вкладення функція в Outlook. Але що, якщо зберігати вкладення з кількох електронних листів або з усієї папки електронної пошти в Outlook? Спробуйте Kutools для Outlook Зберегти все Функція (вкладення).


зберегти вкладення в декількох електронних листах

Пакетний друк усіх вкладень в одному повідомленні електронної пошти

Якщо в одному повідомленні електронної пошти багато вкладень, роздрукувати їх одне за іншим займе багато часу. А наведений нижче метод допоможе вам легко надрукувати всі вкладення у вибраному електронному повідомленні.

1. Виберіть повідомлення електронної пошти, вкладення якого ви надрукуєте пізніше.

2. У програмі Outlook 2010 або пізнішої версії натисніть кнопку філе > друк > Параметри друку. Дивіться наступний знімок екрана:

3. У діалоговому вікні Друк поставте прапорець Роздрукувати прикріплені файли. Вкладення друкуються лише на принтері за замовчуванням опція в Параметри друку .

4. Натисніть друк кнопки.

5. У спливаючому діалоговому вікні Відкриття вкладення пошти натисніть кнопку відкритий кнопку, щоб продовжити. (примітки: Це діалогове вікно відкриється для кожного вкладення окремо.)

Тепер усі вкладення у вибраному електронному повідомленні будуть надруковані одночасно.


Пакетний друк усіх вкладень і зображень у кількох вибраних електронних листах

Щоб надрукувати всі вкладення в кількох електронних листах, а також усі зображення в тілі повідомлення в Outlook, виконайте наведені нижче дії, щоб застосувати код VBA.

1. У списку розсилки, утримуйте Ctrl or Shift клавіші для вибору декількох електронних листів, вкладення яких ви надрукуєте.

2. Прес інший + F11 клавіші разом, щоб відкрити вікно Microsoft Visual Basic for Applications.

3. У вікні Microsoft Visual Basic for Applications натисніть Tools > посилання. А потім перевірте Виконання сценаріїв Microsoft варіант, як показано нижче. Після завершення натисніть OK.

4. Клацання Insert > Модулі, а потім вставте нижче коду VBA у нове вікно модуля.

VBA: Друк усіх вкладень у кількох електронних листах 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. прес F5 або клацніть на прогін кнопку для запуску цього коду VBA. Тепер ви побачите, що всі вкладення у вибраних електронних листах і зображення в тілі meesage роздруковано.

Примітка:

  • Кожне зображення відкриє спливаюче діалогове вікно із запитом на підтвердження друку. У той час як інші типи файлів будуть надруковані безпосередньо.
  • Якщо в електронному підписі є зображення, вони також відображатимуть спливаючі діалогові вікна.
  • Якщо ти отримаєш Макроси в цьому проекті вимкнено помилка, перевірте цей посібник: Як увімкнути та вимкнути макроси в Outlook?

Пакетний друк усіх вкладень у кількох вибраних електронних листах, крім зображень у тілі

Щоб надрукувати лише вкладення в кількох електронних листах, крім зображень у тілі повідомлення в Outlook, виконайте наведені нижче дії, щоб застосувати код VBA.

1. У списку розсилки, утримуйте Ctrl or Shift клавіші для вибору декількох електронних листів, вкладення яких ви надрукуєте.

2. Прес інший + F11 клавіші разом, щоб відкрити вікно Microsoft Visual Basic for Applications.

3. У вікні Microsoft Visual Basic for Applications натисніть Tools > посилання. А потім перевірте Виконання сценаріїв Microsoft варіант, як показано нижче. Після завершення натисніть OK.

4. Клацання Insert > Модулі, а потім вставте нижче коду VBA у нове вікно модуля.

VBA: Друк усіх вкладень у кількох електронних листах 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. прес F5 або клацніть на прогін кнопку для запуску цього коду VBA. Тепер ви побачите, що всі вкладення у вибраних електронних листах роздруковано.

Примітка:

  • Кожне прикріплене зображення відкриє спливаюче діалогове вікно із запитом на підтвердження друку. У той час як інші типи файлів будуть надруковані безпосередньо.
  • Зображення в тілі повідомлення не будуть надруковані.
  • Якщо ти отримаєш Макроси в цьому проекті вимкнено помилка, перевірте цей посібник: Як увімкнути та вимкнути макроси в Outlook?

 


Демонстрація: надрукуйте одне або всі вкладення в електронній пошті Outlook


Чайові: У цьому відео, Кутулс вкладку додає Kutools для Outlook. Якщо вам це потрібно, натисніть тут мати 60-денну безкоштовну пробну версію без обмежень!


Найкращі інструменти продуктивності офісу

Kutools для Outlook - Понад 100 потужних функцій, які покращать ваш Outlook

🤖 AI Mail Assistant: Миттєві професійні електронні листи з магією штучного інтелекту – геніальні відповіді одним клацанням, ідеальний тон, багатомовна майстерність. Трансформуйте електронну пошту без зусиль! ...

???? Автоматизація електронної пошти: Поза офісом (доступно для POP та IMAP)  /  Розклад надсилання електронних листів  /  Автоматична копія/прихована копія за правилами під час надсилання електронної пошти  /  Автоматичне пересилання (розширені правила)   /  Автоматично додавати привітання   /  Автоматично розділяйте електронні листи кількох одержувачів на окремі повідомлення ...

📨 Управління електронною поштою: Легко відкликайте електронні листи  /  Блокуйте шахрайські електронні листи за темами та іншими  /  Видалити повторювані електронні листи  /  розширений пошук  /  Консолідація папок ...

📁 Вкладення ProПакетне збереження  /  Пакетне від'єднання  /  Пакетний компрес  /  Автозавантаження   /  Автоматичне від'єднання  /  Автокомпресія ...

???? Магія інтерфейсу: 😊Більше красивих і класних смайликів   /  Підвищте продуктивність Outlook за допомогою вкладок  /  Згорніть Outlook замість того, щоб закривати ...

👍 Дива в один клік: Відповісти всім із вхідними вкладеннями  /   Антифішингові електронні листи  /  🕘Показувати часовий пояс відправника ...

👩🏼‍🤝‍👩🏻 Контакти та календар: Пакетне додавання контактів із вибраних електронних листів  /  Розділіть групу контактів на окремі групи  /  Видаліть нагадування про день народження ...

більше Особливості 100 Чекайте на ваше дослідження! Натисніть тут, щоб дізнатися більше.

 

 

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