Thursday, May 23, 2013

Code to convert word document to pdf


COM wordApplication;
COM wordDocuments;
COM wordDocument;
COM wordRange;
;

wordApplication = new COM("word.application");
wordDocuments = wordApplication.Documents();
wordDocument = wordDocuments.Open("C:\\temp\\SalesOrder Status.docx");
wordDocument.ExportAsFixedFormat("C:\\temp\\Write2PDFTest.pdf", 17);
wordDocument.close();
wordApplication.quit();

No comments:

Post a Comment