Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
in my macro, I print several tabs and they print a certain order. I'm trying
to open a word doc and print it to my color printer. The macro changes the printer to the color one, but when I run the macro, the word doc doesn't print at all. Any help is appreciated. I have created the reference under (tools/reference). My code is below: Thanks. On Error Resume Next Application.ActivePrinter = "HP C LaserJet 4550N PCL6 on Ne01:" If Err.Number = 1004 Then Application.ActivePrinter = "hp c Laserjet 4550N PCL6 on Ne02:" Err.Clear End If Sheets("Letter").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets("Cover").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets("Agreement").Select Dim WD As Object Set WD = CreateObject("Word.Application") WD.Documents.Open ("G:\CONTRACT\Contract Terms\macro\macro Jun08_04 Warranty&Maintenance Ts&Cs.C.3 Jun2004 FINAL.doc") WD.ActiveDocument.PrintOut WD.Application.Quit SaveChanges:=wdDoNotSaveChanges Set WD = Nothing ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True 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 End Sub |