Submitting an Excel File to Print

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
brianp2

Submitting an Excel File to Print

Post by brianp2 »

Hello,

I have the developer edition of the Document Converter 2.10e. I have created a test app that will create a PDF just fine by using TextOut() to write to the printer. What I need my program to do is to take an Excel file and submit it to the PDF Converter Printer. Is there a way I can just specify the Excel document to be printed to the PDF Printer automatically without having to instantiate the Excel object (like in technical notes 5, Access example) and then call the print command? Any help would be greatly appreciated.

Thanks in advance.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

You may use the BatchConvert() function of CDIntf to print documents in Batch mode to pdf.

I will add here some lines of code that could be helpful:

lngPDFPrintDriver = DriverInit("My PDF Export")
SetDefaultPrinter lngPDFPrintDriver
SetDefaultFileName lngPDFPrintDriver, TempStoragePath & mstrSETFileName
SetFileNameOptions lngPDFPrintDriver, NoPrompt + UseFileName
SetDefaultDirectory lngPDFPrintDriver, Left(mcolFileName(i), 3)
BatchConvertEx lngPDFPrintDriver, mcolFileName(i)
SetFileNameOptions lngPDFPrintDriver, 0

Please note that you will find the needed information about BatchConvert() in the Developers' manual "Common Driver Interface 210.pdf".

Please add your post to one forum only, there is no need to add it to different forums.
Post Reply