[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1778
  • Last Modified:

Run-time error 4608 value out of range

First, I am running in a citrix environment with Word 2000.  
I created macros for printing to different trays, for instance, page 1 will print from tray 3 and all other pages will print from tray 1.  

One user will not work, I receive Run-Time Error '4608': Value Out of Range.

Here is the macro:

Sub scopier()
' scopier Macro
' Macro recorded 9/9/2007 by BAH
varDefaultPrinter = ActivePrinter
    ActivePrinter = "\\BBKW1NOTES\Copier_4045 (Small Copier in Mail Room)"
    With ActiveDocument.PageSetup
        .FirstPageTray = 2
        .OtherPagesTray = 1
    End With
    Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
        Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
        PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0

ActivePrinter = varDefaultPrinter
With ActiveDocument.PageSetup
        .FirstPageTray = 1
        .OtherPagesTray = 1
    End With

End Sub

It's not liking the following line:

With ActiveDocument.PageSetup
        .FirstPageTray = 2

I don't understand why on one person's it doesn't work but all other user's are ok, since we are running in a Citrix enviroment?  Any ideas?

Thank you in advance
2 Solutions
Don't know anything about Citrix but it looks like an environment problem.  Check the faulty user's printer settings.  It might be that his driver says the printer only has 1 tray.

I don't quite understand this bit.  If page 1 is from tray 3 and other pages are from tray 1, surely it should be

   with ActiveDocument.PageSetup
      .FirstPageTray = 3
      .OtherPagesTray = 1
   end with
Hi there.  The code looks fine.  Perhaps it's a case that the particular user profile is corrupt.  If you have Citrix set up to connect all client printers, see if that "\\BBKW1NOTES\Copier_4045 (Small Copier in Mail Room)" printer is one of their printers outside Citrix.  If so, remove it.

The main reason though, as cup has suggested, is the user environment is probably corrupt.  Try deleting that user's profile from the Citrix environment, and then when they log in again, it will be re-created.

Are you using PS 4.5 with the Universal Print Driver, or are you using UniPrint?



Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Tackle projects and never again get stuck behind a technical roadblock.
Join Now