Re: get Paper Tray

From: zSplash (zNOSPAMSplash_at_)
Date: 04/27/04


Date: Tue, 27 Apr 2004 14:02:16 -0800

Thanks so much, Jonathan. You were exactly right -- the driver was not
installed locally.

I have "discovered" the trayID's for one of the 5 printers involved. Seems
sorta goofy, that I would have to locally install the drivers for all of
these printers, and then get the trayID for each bin I need, and then write
code to react to whatever printer is selected. But, this whole thing seems
sorta hokey. Thanks so much for your good code and excellent advice.

st.

"Jonathan West" <jwest@mvps.org> wrote in message
news:OOQFNuFLEHA.4032@TK2MSFTNGP10.phx.gbl...
> Is the printer connected via a network? If so, do you have a locally
> installed copy of the printer driver?
>
> if you do not have a local copy of the driver, install one and try again.
>
> --
> Regards
> Jonathan West - Word MVP
> http://www.multilinker.com
> Please reply to the newsgroup
>
> "zSplash" <zNOSPAMSplash@ gci.net> wrote in message
> news:eYR$Jw9KEHA.1000@TK2MSFTNGP11.phx.gbl...
> > Thanks, Jonathan. So, I did as suggested in your article, and even
though
> I
> > know there are at least 3 paper trays (the multi-purpose tray, the top
> tray,
> > and the bottom tray -- or WHATEVER they're called), the code comes back
> with
> > only one iBinArray(0), and only one choice, "FormSelect". Then, when I
> > select that one option, I get the error:
> > "Run-time error 4608: Value out of range"
> > and when I check the code, it's stopped on
> > ActiveDocument.PageSetup.OtherPagesTray = _
> > vBinNumbers(ListBox1.ListIndex)
> > and if I "hover" I see that the statement = False.
> >
> > Can you make any sense of this?
> > st.
> >
> > "Jonathan West" <jwest@mvps.org> wrote in message
> > news:uz8OP7UKEHA.1156@TK2MSFTNGP09.phx.gbl...
> > > Hi zSplash,
> > >
> > > The general approach is sound.
> > >
> > > There is a big problem with using the Word constants for this.
Different
> > > printer drivers use different values for the various printer trays,
and
> > they
> > > almost never match the values of the Word constants. Therefore, you
need
> > to
> > > find you what tray ID codes are used for your specific printer, and
use
> > > those in place of the Word constants. This article tells you how.
> > >
> > > Controlling the Printer from Word VBA
> > > Part 1: Using VBA to Select the Paper Tray
> > > http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101
> > >
> > > --
> > > Regards
> > > Jonathan West - Word MVP
> > > http://www.multilinker.com
> > > Please reply to the newsgroup
> > >
> > > "zSplash" <zNOSPAMSplash@ gci.net> wrote in message
> > > news:u6jTraLKEHA.2244@tk2msftngp13.phx.gbl...
> > > > I have created a custom document property ("Tray") to value "green"
if
> I
> > > > want my document to print on green paper. I have white paper in my
> top
> > > tray
> > > > (wdPrinterLowerBin), and green paper in my lower tray
> > (wdPrinterUpperBin).
> > > > So, whenever printing, the code checks for the value of "Tray":
> > > > If ActiveDocument.CustomDocumentProperties("Tray").Value =
"green"
> > > Then
> > > > With ActiveDocument.PageSetup
> > > > .FirstPageTray = wdPrinterUpperBin
> > > > .OtherPagesTray = wdPrinterUpperBin
> > > > End With
> > > > Else
> > > > With ActiveDocument.PageSetup
> > > > .FirstPageTray = wdPrinterLowerBin
> > > > .OtherPagesTray = wdPrinterLowerBin
> > > > End With
> > > > End If
> > > >
> > > > Is this reasonable, or is there a better way to do what I'm
attempting
> > to
> > > > do?
> > > >
> > > > TIA, guys.
> > > >
> > > >
> > >
> >
> >
>



Relevant Pages

  • RE: Attansic L2 ethernet hardware
    ... Jonathan Dieter wrote: ... |> I own a Attansic L2 ethernet board and I cant install it it in fedora ... what I did and download the correct driver source code, ...
    (Fedora)
  • Re: XP HOME BOOT FAILURE
    ... you remove the driver for the graphics card, ... >> If you run a repair install as I initially described, ... A repair install should bypass that but it will ... >>>> on, follow the screens. ...
    (microsoft.public.windowsxp.accessibility)
  • Problems with Touchpad,keyboard and USB after Ideacom update (solu
    ... and keyboard .I have made fresh install of XP Home and have all updated ... recomended update from Driver detective,that i use offten. ... allready and when i do this it knocks off my USB mouse leaving me not able to ... 2.Mutil-Access driver HCT driver verify crash fix! ...
    (microsoft.public.windowsxp.general)
  • Re: XP update loses sound card
    ... I assume you tried a forced install of a soundcard? ... should try the sound card driver from Toshiba ... The WINMM WDM Audio driver is out of the list now. ... The sound is enabled and uninstalling the Microsoft WINMM WDM Audio ...
    (microsoft.public.windowsupdate)
  • OT: What do you do with your old computers?
    ... connected that to the WLAN as well, using a small USB wireless link. ... And what about backups for petesp4 and Bigblack? ... Once it was talking to the network, I decided to install the printer and the ... driver, and was marked as an unknown device. ...
    (comp.lang.cobol)