Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    May 2014
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Macro to Print a PDF Document from Hard Drive Excel2011Mac

    Hi,

    I have looked for a solution for my problem but cannot find a relevant solution

    In a nut shell i would like to put a button on an excel sheet which prints a pdf file from my hard drive

    The file will never move or change name

    There are a lot of solutions for multiple documents but mine seems not to need such complex code

    The File I wish to print is Macintosh HD/Users/User/Documents/Doc127.pdf

    In would need to print to the default printer

    Any thoughts?

  2. #2
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts
    That's not so easy

    To print a pdf file you need to instruct your pdf reader to open the file, and then to print it.

    If you are using Adobe reader, for instance, that will not accept command line instructions so you cannot instruct it to print the pdf file.

    What reader are you using for pdf files ?

    NB There are some pdf editors which accept command line instructions.

    An easier alternative would be to import the pdf file into Excel as an Object in Excel, and then print from Excel. You can simply record the steps as a Macro and adjust the resulting VBA code if necessary.

    PS I cannot continue with this thread as I shall be out of Internet range for 2 weeks (hurrah) but there are many contributors here who may be able to help you.

  3. The Following User Says Thank You to MartinM For This Useful Post:

    Alarmbloke (2014-05-11)

  4. #3
    New Lounger
    Join Date
    May 2014
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi Thanks for the response

    I am using Adobe Acrobat X Pro to handle pdfs although i like the idea of adding it as an object as this will keep it all within the spreadsheet. I will have a go at that and report back

  5. #4
    New Lounger
    Join Date
    May 2014
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    A quick update

    Excel 2011 Mac doesn't seem to allow the Insert Object operation for a pdf, however you can drag and drop into a worksheet. Hoping to just have a VBA Print Worksheet.

  6. #5
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts
    Really am dashing away now (to Ulaan Baator) but meantime take a look at this:

    http://livedocs.adobe.com/acrobat_sd...SDK.22.31.html

  7. #6
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,820
    Thanks
    133
    Thanked 481 Times in 458 Posts
    Hi Martin

    ..why not just go to Leeds?
    (it's twinned with Ulan Baator)

    zeddy

  8. #7
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts
    Hi Z,
    That's amazing, I was born in Leeds !
    M (80% there)

  9. #8
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,820
    Thanks
    133
    Thanked 481 Times in 458 Posts
    Hi Martin

    I could tell from your accent.
    So I'm assuming you're on the Trans-Siberian express.
    Didn't know they had wi-fi on that.

    zeddy

  10. #9
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts
    Incheon

Posting Permissions

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