Subject: Excel to PDF through VB
Posted By: dpkbahuguna Post Date: 9/6/2006 1:10:26 AM
Hi ALL !!!

  Can somebody help me. I need to make PDF file from Excel
  using VB.

  Thanks for any suggestion !!!!!

DPK..
Reply By: BrianWren Reply Date: 9/8/2006 9:42:41 AM
PDFs (in any environment) are created by printing to the "printer" that is actually the PDF creating software.  You add this through the Add Printer process in the start menu of Windows.  Once added, it can be selected as the printer of any Windows program.

So, from VB you would call Excel’s printing process, specifying the PDF printer driver as the printer.  (Since this is a Print-To-File operation, I’m sure there will be a need to supply the destination file.)
Reply By: dpkbahuguna Reply Date: 9/9/2006 5:47:39 AM
Thanks Brian for your reply,

can u give me that printing source..
how can i give the print command from vb..

thank you very much...

DPK..
Reply By: BrianWren Reply Date: 9/13/2006 2:59:02 PM
Purchase Adobe Acrobat would be one way.

There are clones available, some are free.  I don't know the name of any of them.

Once you "install" the software, you would go to Start > Settings > Printers.  In the dialog that opens double-click the “Add Printer” icon, or select it then hit “Enter.”  Add the PDF creating driver as a printer.  Then all applications will have that “Printer” available in their list of available printers.

Regarding your question, “how [sic] can i [sic] give the print command from vb” I need to ask, “How are you handling the contact with the Excel resources (*.xls, etc.)?”  Are you using a Excel.Application object?

Go to topic 49628

Return to index page 362
Return to index page 361
Return to index page 360
Return to index page 359
Return to index page 358
Return to index page 357
Return to index page 356
Return to index page 355
Return to index page 354
Return to index page 353