• Run-time error 4608 (Word 2002)

    Author
    Topic
    #391993

    I am having some problems with selecting paper trays when sending a document to print, so I recorded a macro that selects the first paper tray and subsequent trays. The macro is as follows:

    With ActiveDocument.PageSetup
    .FirstPageTray = 257
    .OtherPagesTray = 256
    End With

    When I then run this recorded macro, I get the following error:

    Run-time error ‘4608’
    Value out of range

    The values for the paper trays are correct (this macro runs fine in Word 97).

    I would be grateful for some suggestions.

    Viewing 1 reply thread
    Author
    Replies
    • #702173

      > The values for the paper trays are correct (this macro runs fine in Word 97).

      These kinds of settings are a nightmare, because you run the possibility that for different print drivers Word will use different values. What happens if you re-record on XP; do you actually get the same values?

    • #702183

      Sorry, I didn’t make it very clear did I … the macro was recorded in Word 2002 not in Word 97. When it crashed in Word 2002, I checked the code produced and the tray values are the same as in the macro that runs fine in Word 97.

      That’s why I’m a bit confused. The macro was recorded in Word 2002 and just running it in Word 2002 produces the run-time error and value out of range!

      Any advice would be appreciated.

      • #702365

        Okay, I’ve got two different HP Laserjet 4050 TN printers, one with only built-in trays, and one with an extra huge capacity drawer added to the bottom. Both use the driver “HP Laserjet 4050 Series PS” (the PostScript driver):

        The following paper tray values seem valid for both printers, in other words, it happily lets me set up to print to a tray that does not exist on one printer if I tell it to:

        Tray 1 = 257
        Tray 1 (Manual) = 258
        Tray 2 = 259
        Tray 3 = 260
        Tray 4 = 261
        Default = wdPrinterDefaultBin [constant for 0]
        AutoSelect = wdPrinterFormSource [constant for 15]

        Interestingly, Word does not raise an error if I assign numbered trays when my PDF printer driver is the ActivePrinter. As would be expected, though, the assignments are meaningless and the Page Setup settings are unpredictable as a result.

        So, if you’re getting an error, my guess would be that you have recorded settings from a PostScript driver and are trying to apply them to a PCL driver or vice versa. Otherwise… I’m at a loss.

        • #702432

          Thanks for your response and for trying to help.

          The confusing thing for me is that I have recorded a macro that just selects paper trays, using Word 2002 and the driver for the default printer. Then I am trying to run the same recorded macro, on the same PC, using the same Word 2002, the same printer and printer driver, but now Word 2002 crashes with the run-time error, value out of range – this is the same value Word 2002 just recorded in the macro for this printer/printer driver … some lateral thinking will be required to solve this one, I reckon.

    Viewing 1 reply thread
    Reply To: Run-time error 4608 (Word 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: