ells((i + 6), j) = Sheet1.Cells((i + 6 + (k - 1) * 8), j)Р Next jР Next iР Р twb.Sheets("铁塔需求订单确认表").PageSetup.CenterFooter = Mystr1 & k & Mystr2Р twb.Sheets("铁塔需求订单确认表").ActivateР ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=TrueР Next kР Sheets("铁塔需求订单确认表").Range("a7:q14") = ""Р For i = 1 To nР For j = 1 To 17Р twb.Sheets("铁塔需求订单确认表").Cells((i + 6), j) = Sheet1.Cells((i + m * 8 + 6), j)Р Next jР Next iР Р twb.Sheets("铁塔需求订单确认表").PageSetup.CenterFooter = Mystr1 & m + 1 & Mystr2Р twb.Sheets("铁塔需求订单确认表").ActivateР ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=TrueР End IfРEnd IfР twb.CloseР Set twb = NothingР Application.DisplayAlerts = TrueР Application.ScreenUpdating = TrueРEnd SubР5.将宏代码窗口关闭,另存为启用宏的表格。Р6.将PDF打印设置成默认打印机。Р7.点击表格中的按钮“打印”就可以生成我们所需要的文件了。Р本文的讲解到此就结束了。谢谢!