C# 保存.pptx文件时获取异常
我有一个演示对象,如下所示C# 保存.pptx文件时获取异常,c#,office-interop,com-interop,C#,Office Interop,Com Interop,我有一个演示对象,如下所示 using Presentation = Microsoft.Office.Interop.PowerPoint.Presentation; Presentation pptPresentation = pptApplication.Presentations.Add(MsoTriState.msoFalse); 经过一些处理后,在保存时 pptPresentation.SaveAs(@"c:\temp\myPPT.pptx", Microsoft.Office.I
using Presentation = Microsoft.Office.Interop.PowerPoint.Presentation;
Presentation pptPresentation = pptApplication.Presentations.Add(MsoTriState.msoFalse);
经过一些处理后,在保存时
pptPresentation.SaveAs(@"c:\temp\myPPT.pptx", Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsDefault, MsoTriState.msoTrue);
它抛出了一个异常
我将非常感谢任何人的帮助,这让我很难堪
环境详细信息:-Windows 2008 Server(x64)、.NET 3.5、IIS7最终我得到了神奇的解决方案 我刚刚在Windows 2008服务器中创建了两个文件夹 C:\Windows\SysWOW64\config\systemprofile\Desktop和 C:\Windows\System32\config\systemprofile\Desktop 对文件夹应用读取权限后,ppt将保存在服务器的本地目录中。
错误代码是什么?是的,这些步骤对我也适用。我也给了IIS用户权限。