Sub ExportToPDFs()' source: www.mrexcel.com Dim ws As Worksheet Dim i As Integer Dim dirPath As String, fileName As String, ext As String Dim x As Variant dirPath = "C:\Users\X\Documents\" ext = ".pdf" For Each ws In Worksheets ws.Select nm = ws.Name fileName = nm i = 0 Do x = Dir(dirPath & fileName & ext) If x = "" Then Exit Do i = i + 1 fileName = nm & "_" & i Loop While True ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _ fileName:=dirPath & fileName & ext, _ Quality:=xlQualityStandard, IncludeDocProperties:=True, _ IgnorePrintAreas:=False, OpenAfterPublish:=False Next ws End Sub