Tray Specify with VB

M

Mable

Is it possible to specify which tray of my LJ 5 printer i
want a document to come out of? If there, is please
include example code demonstrating how. Thanks.

-Mable
 
D

Dennis

From the HELP text in vB:

DefaultTrayID Property

Returns or sets the default tray your printer uses to print
documents.

Read/write WdPaperTray.

WdPaperTray can be one of these WdPaperTray constants.

wdPrinterAutomaticSheetFeed
wdPrinterDefaultBin
wdPrinterEnvelopeFeed
wdPrinterFormSource
wdPrinterLargeCapacityBin
wdPrinterLargeFormatBin
wdPrinterLowerBin
wdPrinterManualEnvelopeFeed
wdPrinterManualFeed
wdPrinterMiddleBin
wdPrinterOnlyBin
wdPrinterPaperCassette
wdPrinterSmallFormalBin
wdPrinterTractorFeed
wdPrinterUpperBin


Remarks
You can use the DefaultTray property with a string from the
Default tray box on the Print tab in the Options dialog box
to set this same option.

Example
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
 
M

Mable

Just what I was looking for! Thanks so much.
-----Original Message-----
From the HELP text in vB:

DefaultTrayID Property

Returns or sets the default tray your printer uses to print
documents.

Read/write WdPaperTray.

WdPaperTray can be one of these WdPaperTray constants.

wdPrinterAutomaticSheetFeed
wdPrinterDefaultBin
wdPrinterEnvelopeFeed
wdPrinterFormSource
wdPrinterLargeCapacityBin
wdPrinterLargeFormatBin
wdPrinterLowerBin
wdPrinterManualEnvelopeFeed
wdPrinterManualFeed
wdPrinterMiddleBin
wdPrinterOnlyBin
wdPrinterPaperCassette
wdPrinterSmallFormalBin
wdPrinterTractorFeed
wdPrinterUpperBin


Remarks
You can use the DefaultTray property with a string from the
Default tray box on the Print tab in the Options dialog box
to set this same option.

Example
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



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top