メインコンテンツへスキップ

OutlookでXNUMXつまたは複数の電子メールのすべての添付ファイルを印刷するにはどうすればよいですか?

ご存知のように、クリックするとヘッダー、本文などのメールコンテンツのみが印刷されます。 File > 印刷物 Microsoft Outlookでは、添付ファイルは印刷されません。 ここでは、MicrosoftOutlookで選択した電子メールのすべての添付ファイルを簡単に印刷する方法を紹介します。


すべての添付ファイルをXNUMXつの電子メールメッセージにXNUMXつずつ印刷します

MicrosoftOutlookは私たちに クイックプリント 電子メールメッセージの添付ファイルをXNUMXつずつ印刷するのに役立つ機能。

1。 添付ファイルを後で印刷する電子メールメッセージを選択します。

2。 このメールの添付ファイルをXNUMXつクリックしてください。

3。 クリック クイックプリント ボタンの グループを 添付ファイル タブには何も表示されないことに注意してください。

注: アタッチメントツール メールの添付ファイルをクリックするまでアクティブになりません。

4. メールの添付ファイルを開くダイアログが表示されるので、 Open

この手順により、選択した添付ファイルが開き、同時にこの選択した添付ファイルが印刷されることに注意してください。

この電子メールの他の添付ファイルを印刷するには、手順2から手順4を繰り返してください。

Outlookの複数の電子メールからすべての添付ファイルをすばやく保存/エクスポートする

通常、XNUMXつのメールから添付ファイルを保存するには、 アタッチメントツール また、 すべての添付ファイルを保存 Outlookの機能。 しかし、複数の電子メールから、またはOutlookのメールフォルダ全体から添付ファイルを保存するとどうなりますか? Outlook用のKutoolsをお試しください すべてを救う (添付ファイル)機能。


添付ファイルを複数のメールに保存するkto9

すべての添付ファイルをXNUMXつの電子メールメッセージにバッチ印刷します

XNUMX通のメールにたくさんの添付ファイルがあると、いちいち印刷するのに手間がかかります。 また、次の方法では、選択した電子メール メッセージのすべての添付ファイルを簡単に一括印刷できます。

1。 添付ファイルを後で印刷する電子メールメッセージを選択します。

2。 Outlook 2010以降のバージョンでは、をクリックしてください。 File > 印刷物 > 印刷オプション。 次のスクリーンショットを参照してください。

3. [印刷] ダイアログ ボックスで、 添付ファイルを印刷します。 添付ファイルはデフォルトのプリンターにのみ印刷されます 内のオプション 印刷オプション のセクションから無料でダウンロードできます。

4。 クリック 印刷物

5。 [メールの添付ファイルを開く]ダイアログボックスが表示されたら、[ Open 先に進むためのボタン。 ((Note:このダイアログボックスは、添付ファイルごとに個別に表示されます。)

これで、選択した電子メール メッセージのすべての添付ファイルが一度に印刷されます。


選択した複数の電子メールのすべての添付ファイルと写真をバッチ印刷する

複数の電子メールのすべての添付ファイルと Outlook のメッセージ本文のすべての画像を印刷するには、次の手順に従って VBA コードを適用してください。

1。 メーリングリストで、 Ctrlキー or シフト 添付ファイルを印刷する複数の電子メールを選択するためのキー。

2。 押す 他の + F11 キーを一緒に押して、Microsoft Visual Basic forApplicationsウィンドウを開きます。

3。 [Microsoft Visual Basic for Applications]ウィンドウで、[ ツール > 参考文献。 そして、 Microsoftスクリプトランタイム 以下に示すようにオプション。 完了したら、 をクリックします。 OK.

4に設定します。 OK をクリックします。 インセット > モジュール、次に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 コードを実行します。 選択した電子メールのすべての添付ファイルとメッセージ本文の写真が印刷されていることがわかります。

注:

  • 画像ごとにポップアップ ダイアログ ボックスが表示され、印刷の確認を求められます。 他のタイプのファイルは直接印刷されます。
  • 電子メールの署名に画像がある場合は、ポップアップ ダイアログ ボックスも表示されます。
  • あなたが得るなら このプロジェクトのマクロは無効になっています エラー、このチュートリアルを確認してください: Outlook でマクロを有効または無効にする方法

本文の画像を除く、複数の選択された電子メールのすべての添付ファイルをバッチ印刷します

Outlook で複数の電子メールの添付ファイルのみを印刷し、メッセージ本文の画像を印刷するには、次の手順に従って VBA コードを適用してください。

1。 メーリングリストで、 Ctrlキー or シフト 添付ファイルを印刷する複数の電子メールを選択するためのキー。

2。 押す 他の + F11 キーを一緒に押して、Microsoft Visual Basic forApplicationsウィンドウを開きます。

3。 [Microsoft Visual Basic for Applications]ウィンドウで、[ ツール > 参考文献。 そして、 Microsoftスクリプトランタイム 以下に示すようにオプション。 完了したら、 をクリックします。 OK.

4に設定します。 OK をクリックします。 インセット > モジュール、次に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の電子メールにXNUMXつまたはすべての添付ファイルを印刷する


先端: このビデオで、 クツール タブはによって追加されます Outlook用Kutools。 必要な場合はクリックしてください こちらをご覧ください。 無制限に60日間の無料トライアルがあります!


最高のオフィス生産性向上ツール

Outlook用Kutools - Outlook を強化する 100 以上の強力な機能

🤖 AIメールアシスタント: AI の魔法を備えたインスタント プロのメール - ワンクリックで天才的な返信、完璧な口調、多言語の習得。メールを簡単に変革しましょう! ...

📧 自動メール: 不在時 (POP および IMAP で利用可能)  /  メール送信のスケジュール設定  /  メール送信時のルールによる自動CC/BCC  /  自動転送 (高度なルール)   /  あいさつを自動追加   /  複数受信者の電子メールを個別のメッセージに自動的に分割する ...

📨 電子メール管理: メールを簡単に思い出す  /  件名などで詐欺メールをブロック  /  重複するメールを削除する  /  高度な検索  /  フォルダーを統合する ...

📁 アタッチメント プロバッチ保存  /  バッチデタッチ  /  バッチ圧縮  /  自動保存   /  自動デタッチ  /  自動圧縮 ...

🌟 インターフェースマジック: 😊もっと可愛くてクールな絵文字   /  タブ付きビューで 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