Full width home advertisement

Post Page Advertisement [Top]


void WordtoPDFfile()
{
     Com      document;
     str          pdfPath;
     str         finalPath;
     int         length;
     int         minus;
     str         filePath;
   
     container    confilter = ["DOC","*.doc"];
     filePath        = Winapi::getSaveFileName(0,conFilter,"","Save As",".doc","contracts");

    document.saveas(filePath);
    document.activate();
    document.save();
    length = strlen(filePath);
    minus = length - 3;
    pdfPath = strdel(filePath,minus,4);
    finalPath = pdfPath + ".pdf";
    document.ExportAsFixedFormat(finalPath,17);
    document.close();
    word.quit();
    WinAPI::deleteFile(filePath);
}

Tidak ada komentar:

Posting Komentar

Bottom Ad [Post Page]