Link to home
Create AccountLog in
Avatar of DavidH7470
DavidH7470Flag for United States of America

asked on

Excel PDF viewer

I use a spreadsheet that produces a pdf print of a page automotically from a macro.  The pdf's are gathered in a folder by date as they are printed so that in that days folder there are many pdf's gathered for that days work.  I would like to know is there is way to write a macro that could take the date from a cell that the user inputs and have it compile all the pdf's in the corresponding folder and return it as a single pdf with all of the pages from the folder?  Sort of like in a book form?
Avatar of dlmille
dlmille
Flag of United States of America image

Here's a solution that appears identical to your needs and can be customized from there:
https://www.experts-exchange.com/questions/26980351/Is-it-possible-with-Excel-2010-VBA-to-append-page-print-range-from-sheet-to-existing-pdf.html

You can append PDF's together, but you have to have software that supports that - Acrobat Writer or Pro, for example.  Do you have this software?  If so, then we can use VBA to append the PDF's based on the date range.

Please advise what PDF writing software/version number you have.

Dave
Avatar of DavidH7470

ASKER

Hi Dave:

I reviewed your answer(s) and I can follow some of it.  To make it more clear for me I thought I would give you an example.  All of my pdf's are in folders representing the day they were created.  ie

C:\MyPDFs\2012\May\21\

In this folder there are numerours PDFs with different names that I would like merged into 1 PDF.

So the Marco I would like would need to have the file folder named in a cell (C:\MyPDFs\2012\May\21\) and take all the PDF's in that folder and merge them into a single PDF.  Ideally it would ask the user if they would like to view the files now and also create a new PDF with all the PDF's merged incase the user wants to look at them again later without going through the same routine.

That being said, where in the code you sent does it use C:\MyPDFs\2012\May\21\ as a variable?  Can I then name the output PDF by a name that I want it be saved as?

Hope this helps.

Dave
Dave - The solution I posted was an EXAMPLE working solution.  You could actually download that solution to see if it worked with your configuration.

I'll help you set this up (re: the details you outlined, above), however, you need to advise that you have the appropriate software to allow this to happen.  Do you and your users have Acrobat Standard, Writer, or Pro?  If they just have READER, this will not work.

Dave
Hi Dave:

I do have the Adobe X so it should work fine.  I alrealy use a macro from a spreadsheet to create the individual pdf's which has distiller selected in the references in VBA.

Thanks again for your help.  

Dave
Ok.  Thanks for that clarity.

You want an app that will:

1.  Prompt for the folder of PDF's (or just take the path from the cell?)
2.  Prompt the user to view the files as part of the merge process?  How would you see them viewed?
3.  Prompt the user (or take from a cell) the final PDF filename.

Can you opine on the 3 above, so we're clear?

Dave
ASKER CERTIFIED SOLUTION
Avatar of dlmille
dlmille
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
That works great.  Thank you.