日期:2014-05-17 浏览次数:21010 次
private static void WordToPDF(object filepath, string target)
{
object paramMissing = Type.Missing;
Word.ApplicationClass wordApplication = new Word.ApplicationClass();
Word.Document wordDocument = null;
try
{
object paramSourceDocPath = target;
string paramExportFilePath = filepath.ToString();
Word.WdExportFormat paramExportFormat = Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF;
bool paramOpenAfterExport = false;
Word.WdExportOptimizeFor paramExportOptimizeFor =
Word.WdExportOptimizeFor.wdExportOptimizeForPrint;
Word.WdExportRange paramExportRange = Word.WdExportRange.wdExportAllDocument;
int paramStartPage = 0;
int paramEndPage = 0;
Word.WdExportItem paramExportItem = Word.WdExportItem.wdExportDocumentContent;
bool paramIncludeDocProps = true;
bool paramKeepIRM = true;
Word.WdExportCreateBookmarks paramCreateBookmarks =