Fritz Paul
asked on
VBA to Print from Excel 2010 to pdf to a given path with a given filename.
I have an Excel 2010 workbook with 9 worksheets.
7 of the worksheets each contains a report in a named range on it.
I want to print these reports either individually or preferrably together in one pdf and then save to a given directory using VBA. Before creating any pdf I will use VBA to assign a unique name to it.
I normally use PDFCreator for printing to pdf format, but I will use whatever can do my task well.
Do you have a solution please.
7 of the worksheets each contains a report in a named range on it.
I want to print these reports either individually or preferrably together in one pdf and then save to a given directory using VBA. Before creating any pdf I will use VBA to assign a unique name to it.
I normally use PDFCreator for printing to pdf format, but I will use whatever can do my task well.
Do you have a solution please.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The work flow would be:
1. optional - Copy the named ranges to one worksheet
2. Save the worksheet/workbook as PDF (no need for third-party components)
1. optional - Copy the named ranges to one worksheet
2. Save the worksheet/workbook as PDF (no need for third-party components)
ASKER
Thanks that helped a lot.
It is really convenient.
I can select all the sheets I want to print and then just go save them all together in one pdf.
I recorded a macro and that worked fine.
I will figure out the rest of the code.
It is really convenient.
I can select all the sheets I want to print and then just go save them all together in one pdf.
I recorded a macro and that worked fine.
I will figure out the rest of the code.
Open in new window