用于其他托盘打印的 Word 宏 [英] Word Macro for other tray printing

查看:51
本文介绍了用于其他托盘打印的 Word 宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

多年来,我们的办公室一直使用 HP 打印机和 MS Word 中的一些宏,用于向工具栏添加按钮.一个将作业打印到纸盘 3(普通纸),一个将第一页打印到纸盘 2(预印信头纸),其余打印到纸盘 3,最后一个将整个作业发送到纸盘 1(手动送入标签等).).

For years our office has been using HP printers and a few Macros in MS Word that add buttons to the toolbar. One prints the job to tray 3 (plain paper), one prints the first page to tray 2 (pre-printed letterhead) and the rest to tray 3, and the last sends the whole job to tray 1 (manual feed for labels etc.).

如果打印机发生变化,这一切都是非常直接的调整,但现在我们已经用佳能打印机替换了所有这些 HP 打印机,并且正在使用 UFRII 驱动程序......

This has all been pretty straight cut to tweak if the printer changed, but now we have replaced all of those HP printers with Canon printers and are using the UFRII drivers...

宏有点工作,但不完全.问题是之前的托盘分配是用托盘编号设置的例如.

The macro sort of works, but not quite. The issue is that previously the tray assignments were set with the tray numbers eg.

Sub Letterhead()
'
' Prints the Letterhead copy of documents (First page LH, balance on Plain)
' Created By Reece on 24/01/2011
'
    With ActiveDocument.PageSetup
        .FirstPageTray = 263
        .OtherPagesTray = 262
    End With

    Application.PrintOut , Range:=wdPrintAllDocument

    With ActiveDocument.PageSetup
        .FirstPageTray = wdPrinterDefaultBin
        .OtherPagesTray = wdPrinterDefaultBin

    End With
End Sub

但现在托盘分配使用的是我在下面的内容:

but now the tray assignments are using what I've got below:

Sub Letterhead()
'
' Prints the Letterhead copy of documents (First page LH, balance on Plain)
' Created By Reece on 08/05/2013
'
    With ActiveDocument.PageSetup
        .FirstPageTray = wdPrinterUpperBin
        .OtherPagesTray = wdPrinterMiddleBin
    End With

    Application.PrintOut , Range:=wdPrintAllDocument

    With ActiveDocument.PageSetup
        .FirstPageTray = wdPrinterDefaultBin
        .OtherPagesTray = wdPrinterDefaultBin

    End With
End Sub

通常,我需要通过运行整个程序(页面布局> 更换纸盒> 打印> 更换纸盒)来记录宏,然后记下这些数字来找出新打印机的纸盒编号.. 但我没有得到新打印机的数字.

Usually, all I'd have to do to find out the new printer's tray numbers is record the macro by running through the procedue (page layout > change trays > print > change trays back) and taking note of the numbers... but I'm not getting numbers with the new printers.

谁能帮忙找出佳能 LBP6680 的托盘分配编号是多少?

Can anyone help find what the tray assignment numbers are for Canon LBP6680's?

推荐答案

别担心,这些是 Visual Basic 常量,实际上也是数字.您不必购买某些商业产品.

Don't worry, these are Visual Basic constants, which actually are numbers as well. You don't have to buy some commercial product.

在 Word 中,使用 Alt-F11 组合键打开 VBA 编辑器.在编辑器中,使用 F2 打开 Objectenoverzicht(我有一个荷兰语版本的 Word,也许这叫做对象视图"或什么的).靠近右窗格顶部的是两个下拉列表框.在下面的框中输入一个常量,比如 wdPrinterUpperBin,然后用双筒望远镜点击按钮.右下方将打开一个窗格,其中列出了所有可能的术语.当您选择其中一个时,相应的编号会在窗格下方的部分中给出.

In Word, use the Alt-F11 key combo to open the VBA editor. In the editor, use F2 to open Objectenoverzicht (I have a Dutch version of Word, maybe this is called "Object view" or something). Near the top in the right pane are two drop down list boxes. Type one of the constants, say wdPrinterUpperBin, in the lower box and hit the button with the binocular. A pane opens on the right below that lists all possible terms. When you select one of these, the corresponding number is given in a section below the pane.

亲切的问候,

咕哝

这篇关于用于其他托盘打印的 Word 宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆