有時,當您收到附有多個附件的電子郵件時,您可能希望批量打開它們。 本文將研究此問題,並向您介紹兩種獲取方法。
您必須曾經收到過包含多個附件的電子郵件。 只需雙擊附件,即可輕鬆打開其中一個附件。 但是,如果您想快速批量打開所有附件,如何獲取? 很明顯,Outlook沒有為我們提供這樣的功能。 因此,您需要尋求其他手段。 以下是2個提示。

方法1:通過保存所有附件批量打開所有附件
如果附件具有相同的文件類型,則可以使用以下方法:
- 到tar配合,選擇一封電子郵件。
- 然後將其放在閱讀窗格中的一個附件上。
- 接下來,在可見的“附件”功能區中,您可以找到並單擊“保存所有附件”按鈕。
- 隨後,在彈出的小對話框中,單擊“確定”。
- 在下面的“保存所有附件”對話框中,選擇一個用於保存它們的目標文件夾,然後單擊“確定”。
- 最後,您可以打開所選的文件夾。
- 按“ Ctrl + A”選擇所有已保存的附件。
- 然後右鍵單擊它們。
- 在右鍵菜單中,您可以選擇“打開”選項。
以上方法僅適用於cab所有附件都屬於同一文件類型。 但是,如果沒有,您可以使用以下方式。
方法2:通過Outlook VBA批處理打開所有附件
如果附件為通用文件類型-“ .docx”,“。doc”,“。txt”,“。xlsx”,“ xls”,“。jpg”,“。png”,“ jpeg”,則該方法將有效”。
- 首先,按“ Alt + F11”鍵按鈕。
- 然後您將進入VBA編輯器窗口。
- 現在,您需要打開一個未使用的模塊。
- 隨後,將以下VBA代碼複製並粘貼到其中。
Sub OpenAllAttachments()
Dim objMail As Outlook.MailItem
Dim objAttachments As Outlook.attachments
Dim objAttachment As Outlook.Attachment
Dim objFileSystem As Object
Dim objTempFolder As Object
Dim strFile As String
Dim objWordApp As Word.Application
Dim objWordDocument As Word.Document
Dim objWordRange As Word.Range
Dim objExcelApp As Excel.Application
Dim objExcelWorkbook As Excel.Workbook
Dim objExcelWorkSheet As Excel.Worksheet
Dim objExcelRange As Excel.Range
Set objMail = Application.ActiveExplorer.Selection.Item(1)
Set objAttachments = objMail.attachments
If objAttachments.Count > 0 Then
For Each objAttachment In objAttachments
'Save the attachments to Temp folder
Set objFileSystem = CreateObject("Scripting.FileSystemObject")
Set objTempFolder = objFileSystem.GetSpecialFolder(2)
strFile = objTempFolder.Path & "\" & objAttachment.DisplayName
objAttachment.SaveAsFile strFile
'Batch open all the attached Word documents and Text Files
If InStr(LCase(strFile), "docx") > 0 Or InStr(LCase(strFile), "doc") > 0 Or InStr(LCase(strFile), "txt") > 0 Then
Set objWordApp = CreateObject("Word.Application")
Set objWordDocument = objWordApp.Documents.Open(strFile)
objWordDocument.Activate
Set objWordRange = objWordDocument.Range(0, 0)
objWordApp.Visible = True
objWordDocument.ActiveWindow.Visible = True
End If
'Batch open all the attached Excel workbooks
If InStr(LCase(strFile), "xlsx") > 0 Or InStr(LCase(strFile), "xls") > 0 Then
Set objExcelApp = CreateObject("Excel.Application")
Set objExcelWorkbook = objExcelApp.Workbooks.Open(strFile)
Set objExcelWorkSheet = objExcelWorkbook.Sheets(1)
objExcelWorkSheet.Activate
Set objExcelRange = objExcelWorkSheet.Range("A1")
objExcelRange.Activate
objExcelApp.Visible = True
End If
'Batch open all the attached pictures via Windows image view
If InStr(LCase(strFile), "jpg") > 0 Or InStr(LCase(strFile), "png") > 0 Or InStr(LCase(strFile), "jpeg") > 0 Then
Shell "RunDLL32.exe C:\Windows\System32\Shimgvw.dll,ImageView_Fullscreen " & strFile
End If
Next
End If
End Sub
- 之後,您可以關閉VBA編輯器並將宏添加到快速訪問工具欄。
- 最後,您可以嘗試一下。
- 首先,選擇一封電子郵件。
- 然後單擊快速訪問工具欄中的宏按鈕。
- 立即,所選電子郵件中的所有附件將被批量打開,如以下屏幕截圖所示:
有效保護您的PST數據
由於Outlook PST容易受到各種因素的影響,因此您應該付出很多努力來防止其損壞。 否則,一旦您的PST損壞, 維修PST 將是一項艱鉅的任務。 在這種情況下,Scanpst.exe將無濟於事。 因此,您唯一的方法是應用強大的外部工具,例如 DataNumen Outlook Repair.
作者簡介:
Shirley Zhang是的數據恢復專家 DataNumen,Inc.是數據恢復技術的全球領導者,包括 損壞的MDF 和Outlook修復軟件產品。 欲了解更多信息,請訪問 萬維網。datanumen.COM







