VBA Word 2000: Print to multiple trays...

Hi.

I have a LaserJet 4300 Printer with 4 Trays.
Tray 1 (Manual feed), Tray 2(Letterhead), Tray 3(Yellow/Color), Tray 4 (Plain)

I created a form where a user can choose to which tray they print to.

The code on the form is below:
_____________________________
Option Explicit

Private Sub cmdClose_Click()
frmUSer.Hide
End Sub

' Tray 1 - 264
' Tray 1 (Manual Feed) - 258
' Tray 2 (Letterhead) - 263
' Tray 3 (Colour) - 262
' Tray 4 (Plain) - 259

Private Sub OptionButton1_Click() 'Print 1st page to Letterhead Paper and following pages to plain
 With Selection.PageSetup
        .FirstPageTray = 263
        .OtherPagesTray = 259
    End With
End Sub

Private Sub OptionButton2_Click() 'Print all Pages to Colour Paper
    With Selection.PageSetup
        .FirstPageTray = 262
        .OtherPagesTray = 262
    End With
End Sub


Private Sub OptionButton3_Click() 'Print all pages to Plain Paper
    With Selection.PageSetup
        .FirstPageTray = 259
        .OtherPagesTray = 259
    End With
End Sub

Private Sub cmdPrint_Click() ' Print 1 copy to Letterhead (tray 2) + 1 copy to yellow paper (tray 3)
   If OptionButton4 = True Then
       OptionButton1_Click
       Application.PrintOut
       OptionButton2_Click
       Application.PrintOut
    Else
        Application.PrintOut
    End If
    Unload frmUSer

End Sub
_____________________________

All options work, except for the last one (optionbutton4, which prints a copy of the document to the letterhead tray and another to the colour tray).

This option is crashing Word 2000. When I check the print queue there are 2 jobs. The first one says its printing but nothing happens.

Is there something wrong with my code? Any suggestions on how I could fix this?

Thanks
Priscilla
Priscilla_HoraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Priscilla_HoraAuthor Commented:
I think I may have found a fix to this problem.
I have turned background printing off within word.. and guess what! It all works!!
0
GrahamSkanRetiredCommented:
Well done. Ask for a points refund in the Community Support area.
0
CetusMODCommented:
Question PAQ'd
300 points refunded.

CetusMOD
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.