How to merge multiple PDFs into a single file using VBA?

stastim

Board Regular
Joined
Aug 9, 2004
Messages
89
I have a code that saves individual excel files as pdf, but I'd also like to merge these pdf files into a single pdf file at the end of the macro. Is it doable? Thanks!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Merging PDF files is not a function of Excel. Instead, why not combine all of the Excel data into one worksheet and print that to a PDF? A macro could do that, then delete the merged sheet afterward.
 
Upvote 0
Thanks for the suggestion! Copying/pasting each individual file data into a separate worksheet of the same workbook may actually work. There's a way to save an entire workbook as pdf. That way, page breaks will be perfect too...
 
Upvote 0
So, now I have multiple worksheets in an Excel file, that I want to save as a single .pdf file. Is there a way to automatically add bookmarks to the .pdf file based on the worksheet names? Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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