Solved

How to set paper source in Lexmark T644 using VBA

Posted on 2012-03-25
6
976 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

910 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