How do I programatically convert MS Office (Word and Excel) to PDF?

Q: I am looking for a way to programatically convert MS Office
documents (Word and Excel) to PDF. Is this supported anywhere in the
PDFNet or DotNet Framework? I am using PDFNet SDK (http:// for PDF rendering and file processing, but I
need first to generate PDF from Office.
A: You could use Office 2007 PDF/XPS Export Add-on to convert Office
documents (Word, Excel, etc) to PDF or XPS (

The code should be fairly short. For example:

( Excel.XlFixedFormatType.xlTypePDF, pdfpath,
Excel.XlFixedFormatQuality.xlQualityStandard, true, true, fpage,
tpage, false, oMissing);

For details, please see the following article