Sub BatchConvertWorkBookToPDF()Application.DisplayAlerts = FalseApplication.ScreenUpdating = False Dim fDialog As FileDialog Set fDialog = Application.FileDialog(msoFileDialogFilePicker) Dim vrtSelectedItem As Variant Dim wkBook As Workbook Dim showFolder As Boolean showFolder = False With fDialog .Filters.Add Excel文件, *.xls; *.xlsx; *.xlsm, 1 If .Show = -1 Then For Each vrtSelectedItem In .SelectedItems '如果选择了本工作簿则跳过 If InStrRev(vrtSelectedItem, ThisWorkbook.Name) = 0 Then On Error Resume Next Set wkBook = Application.Workbooks.Open(vrtSelectedItem, ReadOnly:=True, Password:=) '跳过设置打开密码的工作簿 If Not wkBook Is Nothing Then '跳过隐藏的工作簿 If Windows(wkBook.Name).Visible = True Then For i = 1 To Sheets.Count wkBook.Sheets(i).Select Application.Calculation = xlManual wkBook.Sheets(i).Unprotect Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=False Next For i = 1 To Sheets.Count If wkBook.Sheets(i).Name = 不打印 Then wkBook.Sheets(i).Delete Next showFolder = True '转换开始 wkBook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ Left(vrtSelectedItem, InStrRev(vrtSelectedItem, .) - 1) & .pdf _ , Quality:=xlQualityMinimum, IncludeDocProperties:=False, IgnorePrintAreas _ :=False, OpenAfterPublish:=False wkBook.Close , savechanges = False Else wkBook.Close , savechanges = False End If End If End If Next vrtSelectedItem If showFolder Then Call Shell(explorer.exe & Left(fDialog.SelectedItems(1), _ InStrRev(fDialog.SelectedItems(1), \)), vbMaximizedFocus) End If End With Set fDialog = NothingApplication.ScreenUpdating = TrueApplication.DisplayAlerts = TrueEnd Sub直接用VBA,用上面这段代码就可以。