使用MIcrosoft.Office.Interop.PowerPoint和ExportAsFixedFormat将ppt转换为pdf的问题 [英] Problem with convert ppt to pdf using MIcrosoft.Office.Interop.PowerPoint and ExportAsFixedFormat

查看:400
本文介绍了使用MIcrosoft.Office.Interop.PowerPoint和ExportAsFixedFormat将ppt转换为pdf的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hy

当我使用ExportAsFixedFormat尝试将ppt文件导出到pdf文件时出现问题。

My problem occur when I trying export ppt file to pdf file using ExportAsFixedFormat.

我的异常:"系统.Runtime.InteropServices.COMException 0x80006005":错误HRESULT E_FAIL已从COM组件返回一个调用。"

My exception: "System.Runtime.InteropServices.COMException 0x80006005": Error HRESULT E_FAIL has been returned a call from a COM component."

我在C#中的代码

 present.ExportAsFixedFormat(
                    @"C:\aaa\ppt0.pdf",
                    Power.PpFixedFormatType.ppFixedFormatTypePDF,
                    Power.PpFixedFormatIntent.ppFixedFormatIntentPrint,
                    MsoTriState.msoFalse,
                    Power.PpPrintHandoutOrder.ppPrintHandoutVerticalFirst,
                    Power.PpPrintOutputType.ppPrintOutputSlides,//ppPrintOutputBuildSlides, 
                    MsoTriState.msoFalse, null
                    , 
                    Power.PpPrintRangeType.ppPrintAll
                    ,"", false, true, false, false, false);

在Windows 7中,64x和Office 2007完美配合。

In Windows 7 64x and Office 2007 work perfect.

In Windows 7 32x和Office 2007发生如上所述的异常。

In Windows 7 32x and Office 2007 occur exception like above.

哪里有问题?

我可以在互联网上找不到好的解决方案:(

I can not find eny good solution on Internet :(

推荐答案

嗨Thomas Pietrus,

Hi Thomas Pietrus,

谢谢在这里发帖。

根据你的问题与办公室有关,我会把它移到
一般办公室开发
 论坛以获得合适的支持。

According to your question is more related to office, I will move it to General Office Development forum for suitable support.

Visual C#讨论并询问C#编程语言, IDE,库,示例和工具。

The Visual C# discuss and ask the C# programming language, IDE, libraries, samples and tools.

如果您有一些语法或代码错误,请随时与我们联系。我们将尽力为您提供解决方案。

If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

感谢您的理解与合作。

最诚挚的问候,

Wendy


这篇关于使用MIcrosoft.Office.Interop.PowerPoint和ExportAsFixedFormat将ppt转换为pdf的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆