Collate pdfs to one file

jnvm90

New Member
Joined
May 9, 2014
Messages
4
Hi guys,

I am trying to figure out if there is a way to collate pdf's together in VBA.

I have currently written a macro that changes filters for a couple of pivot tables based on a list of variables that I am looping through.

Example of above. My filter is a company name and I have a list of companies that I loop through.

For each of these loops I update my sheets and I want to print a copy of the sheets to a pdf file. However rather than ending up with 20 different pdf files (one for each loop) I want these outputs to be compiled into one pdf file.

Example of above For each company name I calculate the financials of the company and I want to print those financials. Instead of doing it seperately for all companies I want the financial for all companies in one file.

Is that possible?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi you can set this up as an Array selecting the Sheets and then print to PDF which will combine all the sheets into a single pdf file.

Example

Sub MakePDF1A()
Dim FileName As String
FileName = "C:\VBA\Test1"
ThisWorkbook.Sheets(Array(1, 2)).Select
ActiveSheet.ExportAsFixedFormat xlTypePDF, FileName & ".pdf", , , False
End Sub
 
Upvote 0
That would work if I had my calculations in different sheets but the issues is that I want to print sheet 1 with one set of values then update sheet 1 with another set of values and then collate.
 
Upvote 0

Forum statistics

Threads
1,223,244
Messages
6,170,976
Members
452,372
Latest member
Natalie18

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top