几何尺寸与公差论坛

 找回密码
 注册
查看: 590|回复: 0

【转帖】printout2

[复制链接]
发表于 2009-4-12 22:05:41 | 显示全部楼层 |阅读模式
printout2
hi to all,
i took a macro from the link below
what language are you using? vb or vba or vb.net...
also, does the document actually print or not? if it doesn't its a problem with the printout command, if it does its a problem with the pdfjob.ccountofprintjobs.
you might want to try replacing
model.extension.printout2 "0", "1", "false", "pdfcreator", ""
with
model.extension.printout2 0, 1, false, "pdfcreator", ""
thank you luke.
the language is vba.
i think the document does not actually print because when i changed the printer to my default hard copy printer, it also did not print. therefore i think the problem is with the printout2, but i don't know exactly what it is.
i tried your solution to remove the " but there was no success.
any other idea?
thanks again,
amir
you need to pass a variant for the pagerange in the first argument.
dim pagearray(0) as long
pagearray(0) = 0
swmodel.extension.printout2 pagearray, 1, false, "pdfcreator", ""
try that
hi luke
thank you very much for your time.
it worked.
amir
i am having a different issue with .printout2
the line:
model.extension.printout2 vpagearray, copies, collate, "\\server\printer", ""
is not very reliable. (i have the actual server\printer name in my real code)
the printer name is case sensitive so if i installed the printer on my computer as "\\server\printer" it instead sends the print job to the default printer. i'm trying to distribute this code to all my coworkers who have all installed thier printers differently. is there a better way to print to a specific printer?
thanks!
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-23 15:31 , Processed in 0.036852 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表