outlook批量下载附件

This article was written by Sean Tsai, a data warehousing expert and good friend of the How-To Geek

本文由数据仓库专家兼How-To Geek的好朋友Sean Tsai撰写

Have you ever wanted to print every attachment you receive in your Outlook email box? Let’s say you subscribed to a free fax to PDF email service and you want them to be printed out automatically just like an old fashioned fax machine.

您是否曾经想过打印在Outlook电子邮件框中收到的每个附件? 假设您订阅了免费的传真到PDF电子邮件服务,并且希望像老式传真机一样自动将它们打印出来。

Here is a quick way to achieve that if you are comfortable with a little bit of VB (macro) programming.

如果您对一点VB(宏)编程感到满意,这是一个快速的方法。

What we showing here is to create a rule in Outlook and move the incoming fax emails into a separate subfolder. Using VB code we create a macro for you to run a print job against every email in that subfolder so you don’t have to open up the email and print the attachments one by one.

我们在此处显示的是在Outlook中创建规则,并将传入的传真电子邮件移动到单独的子文件夹中。 使用VB代码,我们为您创建了一个宏,可以针对该子文件夹中的每封电子邮件运行打印作业,因此您不必打开电子邮件并一一打印附件。

Step 1

第1步

Create a subfolder named “Batch Prints” under “Mailbox – YourName” in Outlook.

在Outlook中的“邮箱– YourName”下创建一个名为“批打印”的子文件夹。

Step 2

第2步

Create a rule (from menu Tools/Rules and Alerts) in Outlook that looks like this:

在Outlook中创建一个如下所示的规则(从菜单“工具/规则和警报”):

Place the email address from your fax vendor in the field “email@myfaxservice.com”. In the subject line, place the persistent text that is sent from the fax vendor every time (don’t put in the text that will be altered periodically). The 3rd field “Batch Prints” is the subfolder you just created in the first step.

将您的传真供应商的电子邮件地址放在“ email@myfaxservice.com”字段中。 在主题行中,放置每次从传真供应商发送来的永久文本(不要放入会定期更改的文本)。 第三个字段“批打印”是您刚在第一步中创建的子文件夹。

Step 3

第三步

Create a VB macro. First bring up the VB editor by going to Tools/Macro/Visual Basic Editor. You should see the VB editor looks like this:

创建一个VB宏。 首先通过转到“工具/宏/ Visual Basic编辑器”来启动VB编辑器。 您应该看到VB编辑器如下所示:

Step 4

第4步

From the left side Project window, right click on the Project1 item and insert a module named Module1:

在左侧的Project窗口中,右键单击Project1项目,然后插入一个名为Module1的模块:

Step 5

第5步

Once the Module1 is created, copy the code below into the window on the right side as shown in the bullet #3.

创建Module1后,将以下代码复制到右侧的窗口中,如项目符号3所示。

Public Sub PrintAttachments()
Dim Inbox As MAPIFolder
Dim Item As MailItem
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer
Set Inbox = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders.Item("Batch Prints")
For Each Item In Inbox.Items
For Each Atmt In Item.Attachments
' all attachments are first saved in the temp folder C:\Temp.  Be sure to create this folder.
FileName = "C:\Temp\" & Atmt.FileName
Atmt.SaveAsFile FileName
' please change the program folder accordingly if the Acrobat Reader is not installed on drive C:
Shell """C:\Program Files\Adobe\Reader 8.0\Reader\acrord32.exe"" /h /p """ + FileName + """", vbHide
Next
Item.Delete  'remove this line if you don't want the email to be deleted automatically
Next
Set Inbox = Nothing
End Sub

Public Sub PrintAttachments()
Dim Inbox As MAPIFolder
Dim Item As MailItem
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer
Set Inbox = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Parent.Folders.Item("Batch Prints")
For Each Item In Inbox.Items
For Each Atmt In Item.Attachments
' all attachments are first saved in the temp folder C:\Temp.  Be sure to create this folder.
FileName = "C:\Temp\" & Atmt.FileName
Atmt.SaveAsFile FileName
' please change the program folder accordingly if the Acrobat Reader is not installed on drive C:
Shell """C:\Program Files\Adobe\Reader 8.0\Reader\acrord32.exe"" /h /p """ + FileName + """", vbHide
Next
Item.Delete  'remove this line if you don't want the email to be deleted automatically
Next
Set Inbox = Nothing
End Sub

Note that you might need to change the line of code that calls Acrobat to match the path on your system.

请注意,您可能需要更改调用Acrobat的代码行以匹配系统上的路径。

Step 6

第6步

Now the setup is complete. All the emails from your fax vendor will be moved to your “Batch Prints” when they come in. Please note, in the example, we are expecting all attachments are in PDF format so we use Acrobat acrord32.exe to print every attachment.

现在安装完成。 来自您的传真供应商的所有电子邮件在收到时将被移至“批处理打印”中。请注意,在示例中,我们希望所有附件均为PDF格式,因此我们使用Acrobat acrord32.exe来打印每个附件。

Using the Macro

使用宏

Now, when you want to print all attachments, simply go to the macro and run the macro PrintAttachments and all attachments will be printed sequentially. Email will be deleted and moved into trash bin once it has printed.

现在,当您要打印所有附件时,只需转到宏并运行宏PrintAttachments,所有附件将被顺序打印。 电子邮件一旦打印,将被删除并移入垃圾箱。

Note: the prints are routed to your default printer so you have to make sure a valid printer driver is setup and selected.

注意:打印件将发送到默认打印机,因此您必须确保设置并选择了有效的打印机驱动程序。

Hope this is useful!

希望这是有用的!

翻译自: https://www.howtogeek.com/howto/microsoft-office/batch-print-pdf-attachments-in-outlook/

outlook批量下载附件

outlook批量下载附件_在Outlook中批量打印PDF附件相关推荐

  1. python怎么批量下载年报_如何使用python批量下载统计年鉴中的excel网页?

    我们在使用python爬取数据时有时会碰到这样一种情况,有一些网站一点击并不会弹出一个网页,而是直接下载一个excel或者jpg文件.这种情况当然是好的,不用爬虫,就能直接下载数据了,但是有时候需要批 ...

  2. python实现批量下载视频_利用Python实现批量下载腾讯视频!

    原标题:利用Python实现批量下载腾讯视频! 导语 利用Python下载腾讯非VIP视频,也就是可以免费观看的视频.做这个的起因是最近在看一个叫"请吃红小豆吧"的动漫,一共三分钟 ...

  3. python发送邮件带附件_在python中如何发送带有附件的邮件?

    在发邮件时,如果需要发文件,我们会与电子邮件附在一起传送至对方邮箱.用来附加说明或者提供材料用的电子表格 网页.数据库等等是不能简单用文本形式的邮件来发送的,而且表格.网页.数据库等在邮件服务商提供的 ...

  4. python怎么批量下载年报_使用Python批量下载Wind数据库中的PDF报告

    原标题:使用Python批量下载Wind数据库中的PDF报告 背景 最近小编出于工作需要,准备在Wind金融数据终端批量下载上市公司2019年第一季度业绩预告.通过相关的条件检索,发现其相关数据有近百 ...

  5. outlook 禁用不安全_在Outlook 2007中禁用即时搜索

    outlook 禁用不安全 I know what you are thinking when you read the title of this article- why on earth wou ...

  6. python怎么批量下载图片_怎样批量下载在线图片?

    原标题:怎样批量下载在线图片? 大家早啊,我是云景,以前分享过很多关于批量下载图片的技巧,有使用插件程序的,有使用工具的. 之前也教过大家怎么使用F12开发者 今天给大家分享的是,使用Python来批 ...

  7. 用python批量下载网络图片_使用python批量下载图片吗?怎么做?

    没想到吧,我们居然可以用python去下载图片,关于单个下载内容,之前已经出了教程告诉大家,大家应该都知道,图片跟文字似的,经常多个发布,我们如果想得到很多个图片,还得一个代码或者一个图片源的去敲击吗 ...

  8. python批量下载文件-python使用selenium实现批量文件下载

    背景 实现需求:批量下载联想某型号的全部驱动程序. 一般在做网络爬虫的时候,都是保存网页信息为主,或者下载单个文件.当涉及到多文件批量下载的时候,由于下载所需时间不定,下载的文件名不定,所以有一定的困 ...

  9. python 批量下载网页图片_Python实现多线程批量下载图片

    <派森>(Python)3.13 win32 英文安装版 类型:编程工具大小:21M语言:英文 评分:8.7 标签: 立即下载 爬取图片可真的是一个可遇不可求的机会. 有需求就会动力. 目 ...

最新文章

  1. JSP与servlets的区别
  2. Echart图表入门
  3. ASP.NE的缓存技术提高Web站点的性能
  4. 对象的多数组表示(不一样的链表-多数组表示链表)
  5. 卫星影像的AI分类与识别 线上Top1
  6. Tensorflow源码编译
  7. 阴阳师bug以及服务器维护问题,阴阳师业原火bug处理公告汇总
  8. 获得碳中和认证的六个步骤
  9. 43. Pandas查询数据的简便方法df.query
  10. C语言学习教程:搬箱子游戏开发源码分享
  11. 小蒟蒻的blog美化汇总~
  12. 把互联网界的大牛——王煜全老师开出的书单和大家分享一下
  13. android界面UI美化:沉浸模式、全透明或半透明状态栏及导航栏的实现
  14. 数据存储板学习资料第286篇:基于6U VPX 的mSATA高性能数据存储板
  15. 用函数发生器输出高阻态程序
  16. Spark学习之路 (三)Spark之RDD
  17. zookeeper疑难杂症
  18. 基于Java毕业设计校园外卖系统Web端源码+系统+mysql+lw文档+部署软件
  19. 23、基于51单片机温控风扇红外遥控智能温度控制系统设计
  20. 约当消去法求解方程组

热门文章

  1. python关键词_Python批量挖掘百度凤巢关键词
  2. thinkpad p15v 风扇转速快的解决方法
  3. 天猫首页UI层次与类设计分析
  4. 服务器电源维修成都,成都电力电源维修
  5. php 程序发送谷歌邮件
  6. 徐海学院军训计算机系,中gpi国矿业大学徐海学院09级军训队列会操评分表(.docx...
  7. 分享一个小白也能月入2万有趣又高薪的心理兼职
  8. STM32CubeMX——GPIO配置
  9. 032_smallpdf
  10. 易语言-寻找文本和寻找字节集的区别