开发者

Changing Document Name when printing in VB6

开发者 https://www.devze.com 2023-01-22 18:31 出处:网络
We are trying to print to a PDF printer in an unattended application, and the filename that the PDF printer chooses is based on the Document Name that is sent to the printer.

We are trying to print to a PDF printer in an unattended application, and the filename that the PDF printer chooses is based on the Document Name that is sent to the printer.

When printing in VB6, the document name that is sent to the printer is the title of the application (App.title). So, one way that you can get this document name to be something that we like is to temporarily change App.title to the name that you'd like to use.

The problem with this is that App.title is limited to 40 characters. So, if the document name is longer than that, we're kind of out of luck.

So, any way to set the Document Name in a way that doesn't have th开发者_运维百科is limitation (like by using an API call)?

Thanks!


You may want to look at Dan Appleman's Visual Basic Programmer's Guide to the Win32 API Chapter 12. If it can be done in VB6 with the Window's API that would be the first place I would look.


A simple solution is this to

Try changing the app.name for every print job and u'll see the app.name in the printer i hope.

if this did not work for you, then check here for answer for api code

0

精彩评论

暂无评论...
验证码 换一张
取 消