Prints the first two pages of the worksheet named Summary in the workbook named Planning.xls to a file named Planning Summary.prn in the network folder \\server\to_print: : Workbooks « Excel « VBA / Excel / Access / Word
Prints the first two pages of the worksheet named Summary in the workbook named Planning.xls to a file named Planning Summary.prn in the network folder \\server\to_print:
Sub printOut()
Workbooks("Planning.xls").Sheets("Summary").printOut From:=1, To:=2, _
PrintToFile:=True, PrToFileName:="\\server\to_print\Summary.prn" End Sub