Runtime error 4608

B

BuddahBelly

I am using a macro to print in Word and i get the above error
sporadically.
Here is the macro:

Sub White()

With ActiveDocument.PageSetup
.FirstPageTray = wdPrinterLargeCapacityBin
.OtherPagesTray = wdPrinterLargeCapacityBin
End With

Application.PrintOut FileName:="", Range:=wdPrintAllDocument,
Item:=wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, Collate:=True, Background:=True,
PrintToFile:=False

End Sub

it is bombing on the '.FirstPageTray...' line. when i'm in debug mode
and i hover over '.FirstPageTray' it has a value of 9999999 and then
it bombs. if the document prints with no problems then the value is 0
(or object value not set). any ideas why this is happening and any
suggested fixes??

thanks,
BB
 
J

Jezebel

9999999 is the value Word uses for "undefined" or "mixed" (You get it, eg,
if you ask for the font size of a selection that includes text with
different sizes.) In this case, you would get that result -- and presumably
the error -- if the active printer doesn't support the .FirstPageTray
property.

Why not just trap and ignore the error?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Paper Bins by DriverName 18
VBA - Print Current Page 1
Macros 0
Printing selected pages 3
Tidying up code - printing macro 2
VBA and printers 3
Run-time error '4608' 0
Problem with ActiveDocument.PageSetup 2

Top