D
Dudley
I am trying to print with code:
Dim objWord As Word.Application
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
ActivePrinter = "HP LaserJet 4050 PS"
objWord.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="2-20", PageType:= _
wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, Background:= _
True, PrintToFile:=True, PrintZoomColumn:=0, PrintZoomRow:=0, _
PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0,
OutputFileName:=PrnDocName, _
Append:=False
ActiveDocument.Close (wdDoNotSaveChanges)
I get the command 'objWord.Printout...Append:=False' highlighted with error
message 4605, 'method or property not available because document window not
active' (even though I have already opened the document as a form letter).
Can anyone help?
Thanks
Dudley
Dim objWord As Word.Application
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
ActivePrinter = "HP LaserJet 4050 PS"
objWord.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="2-20", PageType:= _
wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, Background:= _
True, PrintToFile:=True, PrintZoomColumn:=0, PrintZoomRow:=0, _
PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0,
OutputFileName:=PrnDocName, _
Append:=False
ActiveDocument.Close (wdDoNotSaveChanges)
I get the command 'objWord.Printout...Append:=False' highlighted with error
message 4605, 'method or property not available because document window not
active' (even though I have already opened the document as a form letter).
Can anyone help?
Thanks
Dudley