Solved

How to set paper source in Lexmark T644 using VBA

Posted on 2012-03-25
6
972 Views
Last Modified: 2012-04-02
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
0
Comment
Question by:calbais
  • 3
  • 2
6 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 37764806
Have you tried:
Options.DefaultTray = "Tray 2"

Open in new window

?
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37764818
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.
0
 

Author Comment

by:calbais
ID: 37786655
Where can I find "WdPaperTray" enumeration constants?
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37793431
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

0
 

Author Closing Comment

by:calbais
ID: 37799095
It was tray 1 on our printer but this works. Thanks for your help!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Outline Suppose you have some simple text based data in Excel that you would like to display as a PowerPoint presentation. Of course it would be possible to write some fairly complex VBA code that created a new slide for each line of the Excel data…
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now