我从一些纸张中选择范围,然后在一个打印作业中打印。 这是我的代码。
Sub PrintAll()
Application.Dialogs(xlDialogPrinterSetup).Show
Application.ScreenUpdating = False
Sheets("Sheet1").Select
ActiveSheet.PageSetup.PrintArea = "$A$12:$R$115"
Sheets("Sheet2").Select
ActiveSheet.PageSetup.PrintArea = "$A$6:$AD$157"
Sheets("Sheet3").Select
ActiveSheet.PageSetup.PrintArea = "$A$6:$M$37"
Sheets("Sheet4").Select
ActiveSheet.PageSetup.PrintArea = "$A$6:$R$37"
Sheets("Sheet5").Select
ActiveSheet.PageSetup.PrintArea = "$A$6:$R$37"
Sheets("Sheet6").Select
ActiveSheet.PageSetup.PrintArea = "$A$6:$R$37"
Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5", "Sheet6")).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Sheets("Sheet1").Select
Range("A6").Select
Application.ScreenUpdating = False
End Sub
然而,它在一个打印作业中随机取出Sheet1,在另一个作业中随机取出5张纸。 能帮忙吗?