Jump to content

Recommended Posts

Posted

Is there a way to automate saving multiple sheets as individual PDF files?

 

I have a document which is around 16-20 sheets (depending on which month it is), and naming the PDF file the same as the sheet it is saving. It is a hassle saving each sheet every month, and was wondering if there was a way I can expedite the process.

 

No downloadable programs, just a plain VBS script should do the job nicely.

Posted

IF anyone was looking at sorting this, I resolved it.

 

Sub PDF_IndividualSheets()
Dim page As Worksheet
Dim title As String
Dim location As String

location = "C:\"
   
   For Each page In Worksheets
       title = page.Name
       
       ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=location & title _
           , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
           :=False, OpenAfterPublish:=False
           
   Next
End Sub

(Change the location as needed)

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...