I'd like to 'save as' a specific sheet or specific range to pdf.
I tried implementing a range into my code.
Here is what I've been working with:
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"c:\Book1.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
The most common method is to copy the selection that you want to save as an individual file in Excel, create a new workbook, and paste the copied selection on it, then save it. However, you may lose some format styles in the selection during copying and pasting, such as row height, etc.
you have the code, just use a range instead of activesheet
e.g. Sheets("Sheet1").Range("B2:H28").ExportAsFixedFormat ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With