Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Menus and Toolbars / March 2005

Tip: Looking for answers? Try searching our database.

Run-time Error 4608 Value out of Range

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike DiCanio - 15 Mar 2005 16:25 GMT
Hi,

I am frustrated.  I keep getting the error  Run-time error '4608' Valule
out of Range.  

Here are the details.  This error only occurs in a specific Word 2003
document.  It happens when I click either one of two buttons on my toolbar
that are linked to a macro that sends the document to either the upper or
lower printer tray.  Here is the VBA code for the macro:

Option Explicit
------------------------------------------
Sub UpperTray()

Dim OriginalFirstPageSetting As Long
Dim OriginalOtherPagesSetting As Long
Dim FirstPageTray As Long
Dim OtherPagesTray As Long
Dim wdPrinterMiddleBin As Long

With ActiveDocument.PageSetup

  OriginalFirstPageSetting = .FirstPageTray
  OriginalOtherPagesSetting = .OtherPagesTray
 
  .FirstPageTray = wdPrinterMiddleBin
  .OtherPagesTray = wdPrinterMiddleBin
           
  ActiveDocument.PrintOut
   
 .FirstPageTray = OriginalFirstPageSetting
 .OtherPagesTray = OriginalOtherPagesSetting
   
End With

End Sub
---------------------------------------------------
Sub LowerTray()

Dim OriginalFirstPageSetting As Long
Dim OriginalOtherPagesSetting As Long
Dim FirstPageTray As Long
Dim OtherPagesTray As Long

With ActiveDocument.PageSetup

   OriginalFirstPageSetting = .FirstPageTray
   OriginalOtherPagesSetting = .OtherPagesTray
   
   .FirstPageTray = wdPrinterLowerBin
   .OtherPagesTray = wdPrinterLowerBin
   
   ActiveDocument.PrintOut
   
   .FirstPageTray = OriginalFirstPageSetting
   .OtherPagesTray = OriginalOtherPagesSetting
End With
End Sub

Can anyone help?  

Thanks.
Cindy M  -WordMVP- - 18 Mar 2005 20:31 GMT
Hi =?Utf-8?B?TWlrZSBEaUNhbmlv?=,

> I am frustrated.  I keep getting the error  Run-time error '4608' Valule
> out of Range.  
>  
This isn't the best place to ask; it's an end-user group. You should ask in
one of the word.vba groups. When you do, be sure to specify on WHICH line of
code the error occurs. Without that information, it will be very difficult
to help you track down the error. My best guess would be that
wdPrinterMiddleBin is an invalid value for your printer.

> Here are the details.  This error only occurs in a specific Word 2003
> document.  It happens when I click either one of two buttons on my toolbar
> that are linked to a macro that sends the document to either the upper or
> lower printer tray.  Here is the VBA code for the macro:

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.