简体   繁体   English

Outlook Interop PrintOut文档名称

[英]Outlook interop PrintOut document name

We use Outlook interop method MailItem.PrintOut() to print a mail message from Outlook. 我们使用Outlook互操作方法MailItem.PrintOut()从Outlook打印邮件。 It is always printed with name " Microsoft Outlook - Memo Style ". 它始终以名称“ Microsoft Outlook-备注样式 ”打印。

" Memo Style " here is a print style which Outlook automatically picks for printing. 备注样式 ”是Outlook自动选择用于打印的打印样式。 Is there any way to give a document any custom name so we can track it in printer queue? 有什么办法可以给文档一个自定义名称,以便我们可以在打印机队列中对其进行跟踪?

It can either be creating a new print style with custom name or explicitly specifying a custom document name . 它可以使用自定义名称创建新的打印样式,也可以显式指定自定义文档名称

Basically, we just need emails printed from Outlook to appear in printer queue with unique names. 基本上,我们只需要从Outlook打印的电子邮件以唯一的名称出现在打印机队列中。 Please advise. 请指教。

我讨厌自己的房子里没有虚拟打印服务器来检查我的假设,但是电子邮件不会在打印队列中作为其各自的主题行列出吗?

Well, PrintSystemObject.Name is not settable outside the assembly, and unfortunately, I believe this is what you see when you view the windows print queue. 好了, PrintSystemObject.Name不能在程序集外部设置,但是不幸的是,我相信这是您在查看Windows打印队列时看到的。 However, PrintSystemJobInfo.JobName does appear to be settable programmatically and may help you get what you need. 但是, PrintSystemJobInfo.JobName确实可以通过编程设置,并且可以帮助您获得所需的内容。

The way to go to solve this is to look at your Printer's properties. 解决此问题的方法是查看打印机的属性。 I use Peernet's TIFF10 Printer and when I right-click the Printer Icon under Devices and Printers and click 'Printer Preferences', it gives me the option to choose filenames under the 'Save' tab. 我使用Peernet的TIFF10打印机,当我右键单击“设备和打印机”下的“打印机”图标并单击“打印机首选项”时,它为我提供了选择“保存”选项卡下文件名的选项。 Check your printer's properties. 检查打印机的属性。 It might have something 可能有些东西

You can do this by.... 你可以这样做...

Mailitem.SaveAs(FilePathName) 'FILE NAME = NEW NAME
Mailitem.Printout()

Then you can simply delete the file you just created, or delete them all at once when you are done in a temp directory. 然后,您可以简单地删除刚刚创建的文件,或者在临时目录中完成操作后立即将其全部删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM