首页  »   C#

将Word文档转换成pdf时分出错

网友分享于:2013-07-10  浏览:14次
将Word文档转换成pdf时候出错
本帖最后由 tengz5201314 于 2013-07-05 12:22:23 编辑

 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 =
上一页1/5下一页

相关解决方案

最新解决方案