Run-time error 4608 value out of range

Posted on 2007-10-10
Last Modified: 2008-01-09
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
Question by:cas_three
    LVL 11

    Accepted Solution

    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
    LVL 65

    Assisted Solution

    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

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
    #Citrix #POC #XenDesktop #vCenter #VMware #ESX
    This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.
    This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

    732 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

    17 Experts available now in Live!

    Get 1:1 Help Now