What I have is an excel spreadsheet with hyperlinks to documents online, I want to print a certain range of these depending on requirements. Most of the time the whole document needs printed, but sometimes we only want certain pages printed, ideally this range of pages would be printed stapled as well.
I have a macro that somewhat does what I'm after:
Option Explicit
Sub PrintHyperlinkedPDFs()
Dim PDFrng As Range, PDF As Range
Dim AdobeReader As String, pdfLINK As String
'there is an extra space at the end of this string
AdobeReader = "C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe "
Set PDFrng = Selection 'change this to whatever method you want for setting
'the range of PDF link cells to process and print
For Each PDF In PDFrng
If PDF.Hyperlinks.Count > 0 Then pdfLINK = PDF.Hyperlinks(1).Address
Shell """" & AdobeReader & """/n /t """ & pdfLINK & """"
Next PDF
End Sub
You highlight what cells containing the links you want to print then run and it sends some of them (if its more than around 4 documents it freezes and doesn't send them all).
Ideally, I would like to set-up some buttons to print pre-defined combinations of these documents but I'm not exactly a VBA professional and therefore this may be out of my skill range..
Any help would be much appreciated.