DefaultTrayID 属性(Word)Options.DefaultTrayID property (Word)

返回或设置打印机用于打印文档的默认纸盒。Returns or sets the default tray your printer uses to print documents. 读/写WdPaperTrayRead/write WdPaperTray.

语法Syntax

expressionexpression. DefaultTrayID

_表达式_一个代表**Options** 对象的变量。expression A variable that represents an Options object.

说明Remarks

选项对话框中的 打印选项卡上 默认纸盒框中的字符串中,可以使用 DefaultTray属性来设置该选项。You can use the DefaultTrayproperty with a string from the Default tray box on the Print tab in the Options dialog box to set this same option.

示例Example

本示例设置 Word 以使用上层纸盒,然后打印活动文档。This example sets Word to use the upper print tray, and then it prints the active document.

Options.DefaultTrayID = wdPrinterUpperBin 
ActiveDocument.PrintOut

本示例返回 "选项" 对话框中 "打印" 选项卡上 "默认纸盒" 选项的当前设置。This example returns the current setting of the Default tray option on the Print tab in the Options dialog box.

Dim lngTray As Long 
 
lngTray = Options.DefaultTrayID

另请参阅See also

选项对象Options Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.