Printing PDF files with VBA

Posted on Thursday 13 April 2006

PDF Creator is a super little tool which lets you print out any documents to a .pdf file. Once it’s installed all you have to do is select it from the print dialog and it will make you that PDF.

But what if you want to get hold of this functionally in your own code? No problemo! Like many 3rd party tools it has a full COM interface, so you can get hold of it with VBA.

Even better is that my Buddy Ken Plus of ExcelGuru.ca has put toghter a whole lot of information and code of precisely how to do it. Ken’s example can be found here:

Late Binding http://www.excelguru.ca/XLVBA/XLVBA12.htm
Early Binding http://www.excelguru.ca/XLVBA/XLVBA14.htm

Thanks Ken!


4 Comments for 'Printing PDF files with VBA'

  1.  
    Zack Barresse
    13 April 2006 | 9:30 pm
     

    This is such a great utility to finally be able to use in Excel! In the upcoming Office 2007 it will probably become moot, but many users will not upgrade to 2007 for quite some time. I’m glad it will be available for those people. Ken did an excellent job on this one!

  2.  
    15 April 2006 | 4:13 pm
     

    Hi Zack!

    Yep, 07 will has pdf builit in, and i would guess it will be in the object model. Still just like you say, there will be a lot of people not up greading to 07 for a very long time so kens work will be very handy! ;-)

  3.  
    TJM
    16 April 2006 | 12:16 pm
     

    Excellent find! I look forward to using it in my code.

  4.  
    20 April 2006 | 6:18 am
     

    Hello all!

    Ross, thanks for the link! I’m glad that everyone is finding it useful. :)

Leave a comment

(required)

(required)


.

Use [VBA] Your Code [/VBA], when posting code, cheers Ross x /


RSS feed for comments on this post | TrackBack URI