Printing from a PDF

Andy David Clarke

New Member
Joined
Jun 14, 2007
Messages
12
I have a rather large pdf document (7,500 pages), from which I need to print selected pages.

The list of what I need to print & what the page numbers are in an excel spreadsheet, so I wanted to try and do this via macro, but I am struggling to find any code to print from a pdf.

It is easy enough to open the pdf through the line
ThisWorkbook.FollowHyperlink Address:="filename.pdf", NewWindow:=True

But I can't figure out how to then print from this.

I am happy to print to a default printer, so all I really need is code something along the lines of:

File("filename.pdf").PrintOut Copies:=1, Pages:="256" to "259" Collate:=True

Is this possible? I have seen this sort of macro for Word (using something like Wordapp), so I fear it may be the case that Excel cannot talk to Adobe in this fashion & I'll need to pursue alternative methods, but it would be useful if anyone can provide an answer!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,224,618
Messages
6,179,919
Members
452,949
Latest member
beartooth91

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