Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在每封邮件中有多个带有一个或多个附件的电子邮件,我怎样才能只转发所有这些附件(不是邮件,只是附件)?我正在寻找一个不需要太多时间的简单解决方案。
在 VBA 中执行此操作相当简单。使用 Explorer.Selection 对象集合遍历其中的 MailItem 对象,并遍历每个 MailItem 的 Attachments 集合,使用 Attachment.SaveAsFile 将每个文件临时保存到磁盘。然后,您可以创建一个新的 MailItem 对象并使用 MailItem.Attachments.Add 添加每个保存的文件,然后调用 MailItem.Display 来显示电子邮件。