Control printer tray from Access vba when printing word documents
Posted on 2007-08-02
I'm trying to print a word document using VBA from Access 2003
All is working fine, however I want to be able to control the tray from which the document is printed.
Typically, one tray holds plain paper used for forms, and another has pre-printed staionary for letters.
I suppose I would also like to be able to control the manual feed as well.
I have a letter xref table which has a tray indicator in it.
I use the following code to try to control the trays but it just doesn't seem to work.
(I've tried Upper and middle of the 'M' option)
'check which tray to print from
If strtray = "U" Then
wordapp.ActiveDocument.PageSetup.FirstPageTray = wdPrinterManualFeed
wordapp.ActiveDocument.PageSetup.OtherPagesTray = wdPrinterManualFeed
If strtray = "M" Then
wordapp.ActiveDocument.PageSetup.FirstPageTray = wdPrinterMiddleBin
wordapp.ActiveDocument.PageSetup.OtherPagesTray = wdPrinterMiddleBin
wordapp.ActiveDocument.PageSetup.FirstPageTray = wdPrinterLowerBin
wordapp.ActiveDocument.PageSetup.OtherPagesTray = wdPrinterLowerBin
I'm I missing something ?