Consulting

Results 1 to 3 of 3

Thread: Printing Embedded PDFs from Excel Workbook

  1. #1
    VBAX Newbie
    Joined
    Jul 2013
    Posts
    2
    Location

    Printing Embedded PDFs from Excel Workbook

    I am willing to name my first born son after the gentleman that helps me solve this issue. I'm desperate!

    I have this code that will open all PDFs in a folder, print them, and close Adobe Acrobat. What I need to happen is to open an EMBEDDED PDF already in the document, print it, and close Adobe Reader.

    Public Sub PrintPDFFiles()
    Const ADOBEPATH As String = "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe"
    Const FILE_PATH As String = "C:\Users\kmackie\Desktop\Sample\Test"
    Const FILE_EXT As String = "PDF"


    Dim fso, fld, file


    Set fso = CreateObject("Scripting.FileSystemObject")
    Set fld = fso.GetFolder(FILE_PATH)


    For Each file In fld.Files
    If UCase(Right(file.Name, 3)) = FILE_EXT Then
    Shell """" & ADOBEPATH & """/n /t """ & file.Path & """"
    End If
    Next
    End Sub
    This code will open the embedded PDF, but I can't figure out how to make Adobe Reader print the darn PDF:
    ActiveSheet.Shapes("Object 6").Select
    Selection.Verb Verb:=xlPrimary

    Please help me!!! All I want is to figure out how to make Adobe Reader print the document once its open.

  2. #2
    VBAX Newbie
    Joined
    Jul 2013
    Posts
    2
    Location
    Id be willing to paypal some $$$ for help in figuring this out. On my honor! I really need to figure this out!

  3. #3
    VBAX Contributor
    Joined
    Dec 2009
    Location
    Sevastopol
    Posts
    150
    Location
    Hope this works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •