Printing Problems

B

Brad

Hello,

I have 6 users who print out a contract from Excel. This is using our color
printer (HP Color LaserJet P_30), which I can get to work with no problem.
The problem I am running into, is my macro that prints this contract opens a
word document and prints that as well. The issue is, some of my users print
on "HP Color LaserJet P_30 on ne01" and some print on "HP Color LaserJet P_30
on ne02". How can I make the word doc print to this color printer . My code
is below. Any help is appreciated.

Sub Finalize()
'
' Finalize Macro
' Macro recorded 12/22/2004 by Psion Teklogix
'

'

Sheets("Agreement").Cells(8, 12).Value = InputBox("Please Enter Contract
#", "Contract #", Sheets("Agreement").Cells(8, 12).Value)
On Error Resume Next
Application.ActivePrinter = "HP Color LaserJet P_30 on Ne01:"
If Err.Number = 1004 Then
Application.ActivePrinter = "HP Color LaserJet P_30 on Ne02:"
Err.Clear
End If
Application.ScreenUpdating = False
Sheets("Letter").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Cover").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Agreement").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Dim WD As Object
Set WD = CreateObject("Word.Application")
WD.Documents.Open ("G:\CONTRACT\Contract Terms\macro\2005
t&cscontract.doc")
WD.ActivePrinter = "HP Color LaserJet P_30:"
WD.ActiveDocument.PrintOut Background:=False
WD.Application.Quit SaveChanges:=wdDoNotSaveChanges
Set WD = Nothing
Sheets("Agreement").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Cover").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Agreement").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.ScreenUpdating = True

End Sub
 

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


Top