Results 1 to 3 of 3

Thread: how to get adobe to print multipul pages of list from a list of PDF drawings in excel

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Rep Power
    0

    Question how to get adobe to print multipul pages of list from a list of PDF drawings in excel

    I had a macro in excel 2007 that worked with adobe 8 but now have adobe 10 which the macro will find the drawings I need from a list which would print out all the prints using adobe 8 but has stopped when adobe 10 was installed . The computer was also changed from XP to Windows 7 . so what do I have to change to get adobe to print the drawings out ,The same printer is used as my default printer and works fine if printed out one page at a time but adobe 10 will not sent to the printer queue but saves as a list of recent pages on the front screen as a list for about 80 drawings which could then be printed out one at a time but that is not the purpose of the macro ( time wasted) .
    Last edited by Eric; 09-04-2013 at 11:01 AM.

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Eric, could you post your existing code here?
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Rep Power
    0
    Code:
    Public Sub printDrawings()
    Dim rng As Range, rCt As Long, r As Long, oExec
    Set rng = ActiveSheet.Columns("B")
    rCt = WorksheetFunction.CountA(rng) + 2
    Set objWShell = CreateObject("Wscript.Shell")
    Set oFSO = CreateObject("Scripting.FileSystemObject")
        
    For r = 2 To rCt
        If ActiveSheet.Range("B" & r).Hyperlinks.Count > 0 Then
            If InStr(1, ActiveSheet.Range("B" & r).Hyperlinks(1).Address, ".pdf", vbTextCompare) > 0 Then
                Shell ("C:\Program Files(86x)\Adobe\Reader 10.0\Reader\AcroRd32.exe /t """ & ActiveSheet.Range("B" & r).Hyperlinks(1).Address & """ " & Application.ActivePrinter)
            Else
                Set oExec = objWShell.Exec("rundll32.exe shimgvw.dll,ImageView_PrintTo /pt """ & ActiveSheet.Range("B" & r).Hyperlinks(1).Address & """ " & Excel.ActivePrinter)
                Do While oExec.Status = 0
                Loop
                ' Clean up
                Set oExec = Nothing
            End If
        End If
    Next r
    Set objWShell = Nothing
    End Sub
    Last edited by Eric; 09-04-2013 at 06:57 PM. Reason: Added codetags;No need to quote when directly answering a question.

Similar Threads

  1. Replies: 2
    Last Post: 07-28-2013, 09:29 AM
  2. Replies: 4
    Last Post: 07-27-2013, 01:34 PM
  3. Print excel sheet to a PDF file
    By xander1981 in forum Excel Help
    Replies: 2
    Last Post: 12-14-2012, 02:16 PM
  4. Delete List Contain Matching from Second List
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 12
    Last Post: 10-07-2012, 07:18 PM
  5. Replies: 0
    Last Post: 03-06-2012, 03:55 AM

Posting Permissions

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