I am not sure exactly how to do this one task. I want to save to PDF all worksheets within an excel workbook. Each of the worksheets would be saved with worksheet.name & ".PDF". The number of worksheets in any workbook could vary.
I think that this would involve the following:
Dim APath As String
APath = ActiveWorkBook.Path
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
APath & ActiveSheet.Name & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
I know you can count the number of worksheets in a workbook, but how do you cycle through them (saving each one, then moving to the next) in a loop? You all have been a great help on learning excel macros. Thank you -
Bookmarks