从多个突出显示的电子邮件中删除某些附件 [英] Remove just certain attachments from Multiple Highlighted emails

查看:127
本文介绍了从多个突出显示的电子邮件中删除某些附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我需要找到一个可以放在1按钮宏下的解决方案,可以删除带有特定文件扩展名的特定附件。 目前我正在做以下事项:

I need to find a solution that can be placed under a 1 button macro, that can remove specific attachments with certain file extensions.  At present I am doing the following:

1)使用OUTLOOK搜索词ext:xxxx(xxxx是文件扩展名)我正在显示所有电子邮件包含给定文件扩展名附件。 然后,我可以按日期订购此过滤器以获取给定年龄的任何电子邮件。

1) Using the OUTLOOK search term ext: xxxx (xxxx being the file extension) I am being shown all emails that contains a given file extension attachment.  I can then order this filter by date to get any emails over a given age.

2)我已经有一个宏,如果我突出显示多个电子邮件,它将删除那些附件中的所有附件。邮件 

2) I already have a Macro that, if I highlight multiple emails, it will remove ALL attachments from those emails. 

我的问题是,这些电子邮件中可能还有其他文件扩展名附件,不应删除。

例如:搜索分机:xlsx将过滤使用XLSX附件的电子邮件,但这些电子邮件也可能附加了PDF或CSV。 

我是否可以使用VBA代码元素专注于特定的文件扩展名,所以如果我只想删除突出显示的电子邮件中的所有XLSX附件,它可以这样做并留下其他附件吗?

Is there an element of VBA code I can use to just focus on a specific file extension, so if I just want all XLSX attachments from highlighted emails removed, it can do so and leave other attachments alone?

下面我粘贴了我正在使用的宏代码,删除了所有附件。 这可以修改为只关注给定的文件类型吗? 即使我有一个仅用于XLXS的宏和另一个用于CSV的宏,也没关系。

Below I have pasted the Macro code I am currently using that removes ALL attachments.  Can this be modded to just focus on a given file type?  Even if I have a macro just for XLXS and another for CSV for example, that would be fine.


公共 Sub ReplaceAttachmentsToLink()

推荐答案

更改代码以解析您希望它运行的扩展的Attachment.FileName。
Change the code to parse Attachment.FileName for the extensions on which you want it to operate.


这篇关于从多个突出显示的电子邮件中删除某些附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆