Link to home
Start Free TrialLog in
Avatar of calbais
calbaisFlag for Canada

asked on

How to set paper source in Lexmark T644 using VBA

I have a sheet of labels (Word 2010 document) at work and would like to be able to automatically select Tray 2 (which contains label paper) whenever I print this page. The printer is a Lexmark T644.

I'm a bit familiar with VBA code if anyone can write a macro that would do this, I could make that work.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or:
Application.MailingLabel.DefaultLaserTray = wdPrinterLowerBin

Open in new window

?
You may have to experiment, because the correct setting will depend on the printer driver.
wdPrinterLowerBin is one of about fifteen WdPaperTray enumertaion constants.
Avatar of calbais

ASKER

Where can I find "WdPaperTray" enumeration constants?
Type wdpapertray in the search box of the Help facility. This is a copy and paste from the entry:
wdPrinterAutomaticSheetFeed 7 Automatic sheet feed. 
wdPrinterDefaultBin 0 Default bin. 
wdPrinterEnvelopeFeed 5 Envelope feed. 
wdPrinterFormSource 15 Form source. 
wdPrinterLargeCapacityBin 11 Large-capacity bin. 
wdPrinterLargeFormatBin 10 Large-format bin. 
wdPrinterLowerBin 2 Lower bin. 
wdPrinterManualEnvelopeFeed 6 Manual envelope feed. 
wdPrinterManualFeed 4 Manual feed. 
wdPrinterMiddleBin 3 Middle bin. 
wdPrinterOnlyBin 1 Printer's only bin. 
wdPrinterPaperCassette 14 Paper cassette. 
wdPrinterSmallFormatBin 9 Small-format bin. 
wdPrinterTractorFeed 8 Tractor feed. 
wdPrinterUpperBin 1 Upper bin. 

Open in new window

Avatar of calbais

ASKER

It was tray 1 on our printer but this works. Thanks for your help!