Macro to Print Select Pages from PDFs

atbarrajas

New Member
Joined
Mar 10, 2014
Messages
4
Hello everyone,


I developed the following code to print PDFs from a list I already have generated with file paths:

Code:
Sub PrintPDF()

    Dim i, count As Integer
    Dim path(), file, adobe As String
    Dim cell As Range
    
    Set cell = Range("A3")
    adobe = "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Acrobat.exe"
    
    count = cell.End(xlDown).Value
    ReDim Preserve path(count)
    
    For i = 1 To count
        file = cell.Offset(1, i).Value
        Shell (adobe & " /n /h /t " & file)
        
    Next i
    
End Sub

Does anyone have any insight on how I can modify this so that I only print the first page of every PDF?


Thank you for your help.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

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