如何在Outlook中從電子郵件中刪除所有附件?
通常,在預覽電子郵件時,可以右鍵單擊刪除附件,然後選擇 刪除附件 項目。 有時,電子郵件中可能有很多附件,將它們一個個地刪除會很麻煩。 在這裡,我們為您安排了兩個簡單的技巧,以刪除一封電子郵件中的所有附件,並在Outlook中也刪除多封電子郵件中的所有附件。
在Outlook中的一封電子郵件中手動刪除所有附件
使用VBA代碼從Outlook中的多封電子郵件中刪除所有附件
使用Kutools for Outlook輕鬆刪除一封或多封電子郵件中的所有附件
在Outlook中的一封電子郵件中手動刪除所有附件
使用以下命令可以輕鬆刪除所選電子郵件中的所有附件。 刪除附件 Outlook中的功能。
步驟1:選擇要在以後刪除附件的電子郵件。
步驟2:單擊“閱讀窗格”中的附件之一以激活附件工具。
步驟3:點擊 選擇全部 按鈕在 選擇 組上 附件 標籤。
此步驟將使您能夠立即選擇此所選電子郵件中的所有附件。
步驟4:點擊 刪除附件 按鈕在 動態 組上 附件 標籤。
步驟5:在警告對話框中,點擊 刪除附件 按鈕。
然後,將盡快刪除此選定電子郵件中的所有附件。
備註:刪除附件功能在Outlook 2010和更高版本中可以正常使用,但在Outlook 2007中則不能。
從Outlook中的多個選定電子郵件中輕鬆刪除所有附件:
隨著 分離所有附件 的效用 Excel的Kutools,您可以輕鬆地從多個選定的電子郵件中刪除所有附件,如下面的演示所示。 (附件將保存到指定的文件夾中) 立即下載並嘗試! (30 天免費試用)
使用VBA代碼從Outlook中的多封電子郵件中刪除所有附件
如果要從Microsoft Outlook中的多封電子郵件中刪除所有附件,則以下方法將幫助您輕鬆地進行操作。 我們推薦你 啟用Microsoft Outlook中的所有宏 首先。
步驟1:前往的資料夾 我的文檔,創建一個新文件夾,並將其命名為 OLA附件
步驟2:選擇多封電子郵件,您將在以後刪除其附件。
注意: 您可以選擇不連續的電子郵件,同時按住 按Ctrl 鍵並單擊。
您可以選擇連續的電子郵件,同時按住 轉移 鍵並單擊。
步驟3:按,打開VBA編輯器 其他 關鍵和 F11 關鍵在同一時間。
步驟4:展開 Project1 > Microsoft Outlook對象 在左欄中,然後雙擊 本次展望會議 在編輯器中打開它。 請參閱以下屏幕截圖:
步驟5:將以下VBA代碼複製並粘貼到編輯窗格中。
Public Sub ReplaceAttachmentsToLink()
Dim objApp As Outlook.Application
Dim aMail As Outlook.MailItem 'Object
Dim oAttachments As Outlook.Attachments
Dim oSelection As Outlook.Selection
Dim i As Long
Dim iCount As Long
Dim sFile As String
Dim sFolderPath As String
Dim sDeletedFiles As String
' Get the path to your My Documents folder
sFolderPath = CreateObject("WScript.Shell").SpecialFolders(16)
On Error Resume Next
' Instantiate an Outlook Application object.
Set objApp = CreateObject("Outlook.Application")
' Get the collection of selected objects.
Set oSelection = objApp.ActiveExplorer.Selection
' Set the Attachment folder.
sFolderPath = sFolderPath & "\OLAttachments"
' Check each selected item for attachments. If attachments exist,
' save them to the Temp folder and strip them from the item.
For Each aMail In oSelection
' This code only strips attachments from mail items.
' If aMail.class=olMail Then
' Get the Attachments collection of the item.
Set oAttachments = aMail.Attachments
iCount = oAttachments.Count
If iCount > 0 Then
' We need to use a count down loop for removing items
' from a collection. Otherwise, the loop counter gets
' confused and only every other item is removed.
For i = iCount To 1 Step -1
' Save attachment before deleting from item.
' Get the file name.
sFile = oAttachments.Item(i).FileName
' Combine with the path to the Temp folder.
sFile = sFolderPath & "\" & sFile
' Save the attachment as a file.
oAttachments.Item(i).SaveAsFile sFile
' Delete the attachment.
oAttachments.Item(i).Delete
'write the save as path to a string to add to the message
'check for html and use html tags in link
If aMail.BodyFormat <> olFormatHTML Then
sDeletedFiles = sDeletedFiles & vbCrLf & "<file://" & sFile & ">"
Else
sDeletedFiles = sDeletedFiles & "<br>" & "<a href='file://" & _
sFile & "'>" & sFile & "</a>"
End If
Next i
'End If
' Adds the filename string to the message body and save it
' Check for HTML body
If aMail.BodyFormat <> olFormatHTML Then
aMail.Body = aMail.Body & vbCrLf & _
"The file(s) were saved to " & sDeletedFiles
Else
aMail.HTMLBody = aMail.HTMLBody & "<p>" & _
"The file(s) were saved to " & sDeletedFiles & "</p>"
End If
aMail.Save
'sets the attachment path to nothing before it moves on to the next message.
sDeletedFiles = ""
End If
Next 'end aMail
ExitSub:
Set oAttachments = Nothing
Set aMail = Nothing
Set oSelection = Nothing
Set objApp = Nothing
End Sub
步驟6:按 F5 運行此VBA代碼。
現在,將刪除所選電子郵件中的所有附件,並在所有所選電子郵件的底部保留指向每個已刪除附件的超鏈接。
使用Kutools for Outlook輕鬆刪除一封或多封電子郵件中的所有附件
全部分離 的附件實用程序 Kutools for Outlook 可以快速刪除Outlook中一封或多封選定電子郵件中的所有附件。 請執行以下操作。
Kutools for Outlook :擁有100多個方便的Outlook加載項, 60天免費試用.
1.選擇一個或多個帶有您要刪除的附件的電子郵件,然後單擊 庫工具 > 附件工具 > 全部分離。 看截圖:
2。 在裡面 分離設置 對話框,請進行以下配置。
- 2.1點擊 瀏覽 按鈕選擇一個文件夾來保存所有已刪除的附件。
- 2.2默認情況下, 拆下以下樣式的附件 框被選中,請根據需要選擇一個選項將附件根據電子郵件保存到不同的文件夾中。
- 2.3點擊 OK 按鈕。 看截圖:
3。 點擊 是 按鈕在 全部分離 對話框。
4.然後 Kutools for Outlook 將彈出對話框,告訴您刪除了多少個附件。 請點擊 OK 按鈕。
現在,所有附件都將被立即刪除,只有超鏈接保留在所選電子郵件中。 您可以單擊超鏈接以根據需要打開相應的附件。
如果您想免費試用(60天)此實用程序, 請點擊下載,然後按照上述步驟進行操作。
最佳辦公生產力工具
Kutools for Outlook - 超過 100 種強大的功能可增強您的 Outlook
🤖 人工智慧郵件助手: 具備人工智慧魔力的即時專業電子郵件——一鍵天才回覆、完美語調、多語言掌握。輕鬆改變電子郵件! ……
📧 電子郵件自動化: 外出(適用於 POP 和 IMAP) / 安排發送電子郵件 / 發送電子郵件時按規則自動抄送/密件副本 / 自動轉送(進階規則) / 自動添加問候語 / 自動將多收件者電子郵件拆分為單獨的訊息 ...
📨 電子郵件管理: 輕鬆回憶電子郵件 / 按主題和其他人阻止詐騙電子郵件 / 刪除重複的電子郵件 / 進階搜索 / 合併資料夾 ...
📁 附件專業版: 批量保存 / 批量分離 / 批量壓縮 / 自動保存 / 自動分離 / 自動壓縮 ...
🌟 介面魔法: 😊更多又漂亮又酷的表情符號 / 使用選項卡式視圖提高 Outlook 工作效率 / 最小化 Outlook 而不是關閉 ...
👍 一鍵奇蹟: 使用傳入附件回覆全部 / 反網路釣魚電子郵件 / 🕘顯示寄件者的時區 ...
👩🏼🤝👩🏻 通訊錄和行事曆: 從選定的電子郵件中大量新增聯絡人 / 將聯絡人群組拆分為各組 / 刪除生日提醒 ...
超過 100特點 等待您的探索! 按此處了解更多。