PPT文档转PDF文档时出错.,该如何解决

PPT文档转PDF文档时出错.
业务逻辑是要把Office文档(.doc/.xls/.ppt)先转成PDF,再转成SWF,.doc和.xls都编译正常,就这个.ptt编译不过去.


PpSaveAsFileType targetFileType = PpSaveAsFileType.ppSaveAsPDF;
object missing = Type.Missing;
Microsoft.Office.Interop.PowerPoint.ApplicationClass application = null;
Microsoft.Office.Interop.PowerPoint.Presentation persentation = null;

application = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
                        
persentation = application.Presentations.Open(sourcePath, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoFalse);        // 441行
targetFile = targetPath + fName + ".pdf";
persentation.SaveAs(targetFile, targetFileType, Microsoft.Office.Core.MsoTriState.msoTrue);          // 443行
reList.Add(string.Format("{0} 处理完成。", sourcePath));
IsSuccess = true;


编译时提示错误:
错误 2 The type 'Microsoft.Office.Core.MsoTriState' is defined in an assembly that is not referenced. You must add a reference to assembly 'office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. D:\PDFtoSWFService\Bll\PDFtoSWF.cs 441 25 Bll
错误 3 The best overloaded method match for 'Microsoft.Office.Interop.PowerPoint.Presentations.Open(string, Microsoft.Office.Core.MsoTriState, Microsoft.Office.Core.MsoTriState, Microsoft.Office.Core.MsoTriState)' has some invalid arguments D:\PDFtoSWFService\Bll\PDFtoSWF.cs 441 40 Bll
错误 4 Argument 2: cannot convert from 'Microsoft.Office.Core.MsoTriState [d:\PDFtoSWFService\Bll\PDFtoSWF.cs]' to 'Microsoft.Office.Core.MsoTriState' D:\PDFtoSWFService\Bll\PDFtoSWF.cs 441 83 Bll
错误 5 Argument 3: cannot convert from 'Microsoft.Office.Core.MsoTriState [d:\PDFtoSWFService\Bll\PDFtoSWF.cs]' to 'Microsoft.Office.Core.MsoTriState' D:\PDFtoSWFService\Bll\PDFtoSWF.cs 441 104 Bll
错误 6 Argument 4: cannot convert from 'Microsoft.Office.Core.MsoTriState [d:\PDFtoSWFService\Bll\PDFtoSWF.cs]' to 'Microsoft.Office.Core.MsoTriState' D:\PDFtoSWFService\Bll\PDFtoSWF.cs 441 126 Bll
错误 7 The best overloaded method match for 'Microsoft.Office.Interop.PowerPoint._Presentation.SaveAs(string, Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType, Microsoft.Office.Core.MsoTriState)' has some invalid arguments D:\PDFtoSWFService\Bll\PDFtoSWF.cs 443 25 Bll
错误 8 Argument 3: cannot convert from 'Microsoft.Office.Core.MsoTriState [d:\PDFtoSWFService\Bll\PDFtoSWF.cs]' to 'Microsoft.Office.Core.MsoTriState' D:\PDFtoSWFService\Bll\PDFtoSWF.cs 443 73 Bll


------解决思路----------------------
MsoTriState类缺少引用
------解决思路----------------------
office是系统组件,只using是不行的吧,你确定添加引用的地方,已经把dll引用进来了?
------解决思路----------------------
使用aspose试试