Print excel file to pdf using COM?

I would like to do the following:

I want to create a COM object for an excel file, and print this file to PdfCreator, using the AutoSave options to prevent the gui to pop up. (I'm using Qt and C++, but that should not be a constraint)

I use a COM object for PdfCreator to change the autosave options, then use a COM object for Excel to change the data inside the file, and finally use the Excel COM object to print to PdfCreator. Is this supposed to work, or are the options in the PdfCreator COM object not shared with the printer used from inside the Excel COM object?

    QAxObject* pdf = new QAxObject("PDFCreator.clsPDFCreator");
    QAxObject* oldOptions = pdf->querySubObject("cOptions");
    QAxObject* options = pdf->querySubObject("cOptions");
    options->setProperty("UseAutosave", 1);
    options->setProperty("UseAutosaveDirectory", 1);
    options->setProperty("AutosaveFormat", 0);
    options->setProperty("AutosaveDirectory", "C:\\\\temp");
    options->setProperty("AutosaveFilename", "report.pdf");
    pdf->setProperty("cOptions", options->asVariant());

    pdf->dynamicCall("cSaveOptions(PDFCreator.clsPDFCreatorOptions)", options->asVariant());

    QAxObject* excel = new QAxObject("Excel.Application");
    QAxObject* workbooks = excel->querySubObject( "Workbooks" );
    QAxObject* workbook = workbooks->querySubObject( "Open(const QString&)", "report.xls");

    QAxObject* worksheets = workbook->querySubObject( "Worksheets" );
    QAxObject* worksheet = worksheets->querySubObject( "Item( int )", 1 );

    // manipulate the data in the excel file...

    worksheet->dynamicCall( "PrintOut(int,int,int,bool,String)",
                                             1, 100, 1, QVariant(false), "PDFCreator");

    pdf->dynamicCall("cSaveOptions(PDFCreator.clsPDFCreatorOptions)", oldOptions->asVariant());

You must insert the command cstart before the line

QAxObject* oldOptions = pdf->querySubObject("cOptions");




 You have to call de print automation command  of Excel, and previously select the pdfcreator printer, to redirect the print to pdfcreator.


On the review, some of the women will warn you from purchasing a fake GHD IV Styler. Some websites will con people into purchasing them. It doesn't matter if it comes from a proper salon. They can sometimes try to sell you a fake.Some women feel that the GHD IV Pink Styler leaves their even frizzier than the old stylers. While other women think that, it tugs on their hair too much. The round barrel tangles into their hair when they're styling it. Be aware that the thermal fuse can blow while using the styler. This is a safety feature to keep the styler from overheating, but it happens often.When you buy the GHD IV Styler or GHD IV Purple Styler, you will get an instructional DVD with it. On the DVD, you will learn how to do flips and twists, along with straight styles. It's handy for the first timers who are new to the GHD Purple line. These GHD IV Styler Sale and GHD Styler specification on this styler is ceramic coated aluminium, a 9-foot swivel cord, floating blades for effortless styling, a built-in microprocessor, and a thermal fuse. If you want to have the film star locks or pop star looks or you fancy a wave or love to have straight hair then this GHD Straighteners has brought for you various hair styling tools that allow you to create fantastic styles whenever you want, at your own time and with ease.Electrical GHD IV Styler is the new limited edition GHD Straighteners For Sale which is available in four limited edition glossy shades Red, Blue, Purple and Green.On trend for Spring/Summer, acid and dusty brights have already graced the catwalks at Josh Goot’s show, while wildly bright prints featured at Basso & Brooke.Each GHD Straighteners On Sale from the Colour Collection comes with a quilted styler pouch and protective case.We action the Lacoste Sale on auction which is in top quality, reasonable price,just accept a try, it is absolutely to accompany you both in and out. by the way, we accept abounding added styles available. Bargain Lacoste Shoes Sale articles directory, bargain Shoes Online, bargain lacoste shoes manufacturers suppliers branch , advertise bargain lacoste shoes absolute in our Lacoste Shoes Online . Welcome to visit again and recommend your friends to buy.Thank you!

News comes from:

The FRA received more than $67 million in state and local government requests for these funds, which will be used to enhance louis vuitton handbags outlet safety, livability, and economic development in American communities. “The overwhelming number of applications we received for this program shows that state and local discount louis vuitton handbags officials recognize the economic boost that comes with improving transportation infrastructure,” said Secretary LaHood.