批量打印本文件夹内除本工作簿以外所有工作簿的第一个工作表
Sub Sample() Dim MyPath As String Dim MyBook Application.DisplayAlerts = False MyPath = ThisWorkbook.Path MyBook = Dir(MyPath & "\*.xlsx") Do While MyBook <> "" If MyBook <> ThisWorkbook.Name Then With Workbooks.Open(MyBook) .Sheets(1).PrintOut .Close End With End If MyBook = Dir Loop Set MyBook = Nothing Application.DisplayAlerts = True End Sub