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

Outlookで電子メールメッセージを画像形式(jpg/tiff)として保存するにはどうすればよいですか?

Author: Siluvia Last Modified: 2025-08-06

Outlookで電子メールメッセージをjpgやtiffのような画像として保存しようとしたことはありますか?この記事では、この問題を解決するための方法をご紹介します。

VBAコードを使用して電子メールメッセージを画像形式で保存する


VBAコードを使用して電子メールメッセージを画像形式で保存する

以下の手順に従って、Outlookで電子メールメッセージを画像形式として保存してください。

1. 画像として保存したい電子メールを選択し、Alt + F11キーを同時に押して「Microsoft Visual Basic for Applications」ウィンドウを開きます。

2. 「Microsoft Visual Basic for Applications 」ウィンドウで、「挿入 」>「UserForm」をクリックしてください。スクリーンショットをご覧ください:

steps on saving email message as picture format (jpg/tiff) in outlook

3. 下記のスクリーンショットのように、Userformを作成します。

steps on saving email message as picture format (jpg/tiff) in outlook

4. jpgオプションボタンを選択し、左側のプロパティペインでその名前をopbJPGに変更します。

steps on saving email message as picture format (jpg/tiff) in outlook

5. 上記の手順4を繰り返して、他のオプションボタンの名前をopbTIFFに変更します。「OK」コマンドボタンと「キャンセル」コマンドボタンの名前もそれぞれcdbOk およびcdbCancel に変更します。

注:「Microsoft Visual Basic for Applications」ウィンドウにプロパティペインが表示されない場合は、F4キーを押してペインを表示させてください。

6. ユーザーフォーム上の任意の空白をダブルクリックしてコードウィンドウを開きます。すべてのコードを次のVBAスクリプトに置き換えます。その後、コードウィンドウを閉じます。

VBAコード1:電子メールメッセージを画像として保存

Option Explicit
'Update by Extendoffice 2018/3/5
Public xRet As Boolean
Private Sub cdbCancel_Click()
  xRet = False
  FrmPicType.Hide
End Sub
Private Sub cdbOk_Click()
  xRet = True
  FrmPicType.Hide
End Sub

7. UserForm1を選択し、下記のスクリーンショットに示すようにプロパティペインでその名前をFrmPicType に変更します。

steps on saving email message as picture format (jpg/tiff) in outlook

8. 「挿入」>「モジュール」をクリックし、次のVBAコードをモジュールウィンドウにコピーします。

VBAコード2:電子メールメッセージを画像として保存

Public Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'Update by Extendoffice 2018/3/5
Sub ExportEmailAsImage()
Dim xMail As Outlook.MailItem
Dim xFileName, xFilePath, xWdDocPath As String
Dim xPPTApp As PowerPoint.Application
Dim xPresentation As PowerPoint.Presentation
Dim xPPTShape As PowerPoint.Shape
Dim xPicType As String
Dim xFileFormat As PpSaveAsFileType
On Error Resume Next
FrmPicType.Show
If FrmPicType.xRet Then
  If FrmPicType.opbJPG.Value = True Then
    xPicType = ".jpg"
    xFileFormat = ppSaveAsJPG
  ElseIf FrmPicType.opbTIFF.Value = True Then
    xPicType = ".tiff"
    xFileFormat = ppSaveAsTIF
  End If
Else
  Exit Sub
End If
Set xShell = CreateObject("Shell.Application")
Set xFolder = xShell.BrowseForFolder(0, "Select a folder:", 0, 0)
If Not TypeName(xFolder) = "Nothing" Then
    Set xFolderItem = xFolder.self
    xFilePath = xFolderItem.Path & "\"
Else
    xFilePath = ""
    Exit Sub
End If
'ShellExecute 0, "Open", "POWERPNT.exe", "", "", 0
Set xPPTApp = New PowerPoint.Application
xPPTApp.Height = 0
xPPTApp.Width = 0
xPPTApp.WindowState = ppWindowMinimized
xPPTApp.Visible = msoFalse
For Each xMail In Outlook.Application.ActiveExplorer.Selection
    xFileName = Replace(xMail.Subject, "/", " ")
    xFileName = Replace(xFileName, "\", " ")
    xFileName = Replace(xFileName, ":", "")
    xFileName = Replace(xFileName, "?", " ")
    xFileName = Replace(xFileName, Chr(34), " ")
    xWdDocPath = Environ("Temp") & "\" & xFileName & ".doc"
    xMail.SaveAs xWdDocPath, olDoc
    
    Set xPresentation = xPPTApp.Presentations.Add
    xPresentation.Application.WindowState = ppWindowMinimized
    xPresentation.Application.Visible = msoFalse
    With xPresentation
        .PageSetup.SlideHeight = 900 '792
        .PageSetup.SlideWidth = 612
        .Slides.AddSlide 1, .SlideMaster.CustomLayouts(1)
    End With
    xPPTApp.WindowState = ppWindowMinimized
    With xPresentation.Slides(1)
         .Application.Visible = msoFalse
         Set xPPTShape = .Shapes.AddOLEObject(0, 0, 612, 900, , xWdDocPath)
         xPresentation.SaveAs xFilePath & xFileName & xPicType, xFileFormat, msoTrue
    End With
    xPresentation.Close
Next
xPPTApp.Quit
MsgBox "Mails has been successfully saved as picture", vbInformation + vbOKOnly
End Sub

9. 「ツール」>「参照設定」をクリックし、「Microsoft PowerPoint Object Library」のチェックボックスをオンにして「OK」ボタンをクリックします。スクリーンショットをご覧ください:

steps on saving email message as picture format (jpg/tiff) in outlook

10. F5キーを押してコードを実行します。すると、UserForm1ダイアログボックスがポップアップ表示されますので、画像タイプを選択し、「OK」ボタンをクリックしてください。スクリーンショットをご覧ください:

steps on saving email message as picture format (jpg/tiff) in outlook

11. 「フォルダーの参照」ダイアログボックスで、画像を保存するフォルダーを指定し、「OK」ボタンをクリックします。

steps on saving email message as picture format (jpg/tiff) in outlook

12. 最後に、Microsoft Outlookダイアログボックスが表示され、保存が完了したことが通知されます。「OK」ボタンをクリックしてください。

steps on saving email message as picture format (jpg/tiff) in outlook

これで選択した電子メールは、jpgまたはtiffの画像に変換され、指定したフォルダーに正常に保存されました。


関連記事:


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

速報:Kutools for Outlook が無料版をリリース!

新しくなった Kutools for Outlook を100以上の素晴らしい機能とともに体験してください!今すぐダウンロード!

🤖 Kutools AI : 高度なAI技術を活用し、メールの返信、要約、最適化、拡張、翻訳、作成を効率良くこなします。

📧 メール自動化: 自動返信(POPとIMAPに対応) / メール送信のスケジュール設定 /送信時にルールで自動 CC/BCC / 高度なルールによる自動転送 / 挨拶文を自動追加 / 複数宛先のメールを自動で個別のメールに分割 ...

📨 メール管理: メールの取り消し / 件名やその他の条件で迷惑メールをブロック / 重複したメールの削除 / 高度な検索 / フォルダーを整理 ...

📁 添付ファイルPro: 一括保存 / 一括切り離し / 一括圧縮 / 自動保存 / 自動的に切り離す / 自動圧縮 ...

🌟 インターフェースマジック: 😊もっとキレイで楽しい絵文字 /重要なメールの到着をお知らせ / Outlookを閉じずに最小化 ...

👍 ワンクリック便利機能: 全員に【Attachment】付きで返信 /迷惑メール対策 / 🕘送信者のタイムゾーン表示 ...

👩🏼‍🤝‍👩🏻 連絡先&カレンダー: 選択したメールから連絡先を一括追加 /連絡先グループを個別のグループに分割 / 誕生日のリマインダーを削除 ...

お好みの言語で Kutools をご利用いただけます ― 英語、スペイン語、ドイツ語、フランス語、中国語など40以上をサポート!

Kutools for Outlook はワンクリックですぐにアンロックできます。今すぐダウンロードして効率をアップしましょう!

kutools for outlook features1 kutools for outlook features2