如何在Outlook中从电子邮件中删除所有附件?
通常,在预览电子邮件时,可以右键单击删除附件,然后选择 删除附件 项目。 有时,电子邮件中可能有很多附件,将它们一个一个地删除会很麻烦。 在这里,我们为您安排了两个简单的技巧,以删除一封电子邮件中的所有附件,并在Outlook中也删除多封电子邮件中的所有附件。
在Outlook中手动删除一封电子邮件中的所有附件
使用VBA代码从Outlook中的多封电子邮件中删除所有附件
使用Kutools for Outlook轻松删除一封或多封电子邮件中的所有附件
在Outlook中手动删除一封电子邮件中的所有附件
使用以下命令可以轻松删除所选电子邮件中的所有附件。 删除附件 Outlook中的功能。
第1步:选择将在以后删除其附件的电子邮件。
步骤2:单击“阅读窗格”中的附件之一以激活附件工具。
步骤3:点击 选择全部 按钮在 选择 组上 附件 标签。
此步骤将使您能够立即选择此所选电子邮件中的所有附件。
步骤4:点击 删除附件 按钮在 行动 组上 附件 标签。
步骤5:在警告对话框中,点击 删除附件 按钮。
然后,将尽快删除此选定电子邮件中的所有附件。
备注:删除附件功能在Outlook 2010和更高版本中可以正常使用,但在Outlook 2007中则不能。
从Outlook中的多个选定电子邮件中轻松删除所有附件:
随着 分离所有附件 实用程序 Kutools for Excel,您可以轻松地从多个选定的电子邮件中删除所有附件,如下面的演示所示。 (附件将保存到指定的文件夹中) 立即下载并尝试! (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。 点击 USB MIDI(XNUMX通道) 按钮在 全部分离 对话框。
4.然后 Kutools for Outlook 将弹出对话框,告诉您删除了多少个附件。 请点击 OK 按钮。
现在,所有附件都将被立即删除,只有超链接保留在所选电子邮件中。 您可以单击超链接以根据需要打开相应的附件。
如果您想免费试用(60天)此实用程序, 请点击下载,然后按照上述步骤进行操作。
最佳办公生产力工具
Kutools for Outlook - 超过 100 种强大功能可增强您的 Outlook
🤖 人工智能邮件助手: 具有人工智能魔力的即时专业电子邮件——一键天才回复、完美语气、多语言掌握。轻松改变电子邮件! ...
📧 电子邮件自动化: 外出(适用于 POP 和 IMAP) / 安排发送电子邮件 / 发送电子邮件时按规则自动抄送/密件抄送 / 自动转发(高级规则) / 自动添加问候语 / 自动将多收件人电子邮件拆分为单独的消息 ...
📨 电子邮件管理: 轻松回忆电子邮件 / 按主题和其他人阻止诈骗电子邮件 / 删除重复的电子邮件 / 高级搜索 / 合并文件夹 ...
📁 附件专业版: 批量保存 / 批量分离 / 批量压缩 / 自动保存 / 自动分离 / 自动压缩 ...
🌟 界面魔法: 😊更多又漂亮又酷的表情符号 / 使用选项卡式视图提高 Outlook 工作效率 / 最小化 Outlook 而不是关闭 ...
👍 一键奇迹: 使用传入附件回复全部 / 反网络钓鱼电子邮件 / 🕘显示发件人的时区 ...
👩🏼🤝👩🏻 通讯录和日历: 从选定的电子邮件中批量添加联系人 / 将联系人组拆分为各个组 / 删除生日提醒 ...
超过 100特点 等待您的探索! 单击此处了解更多。