我需要什么参考才能创建PowerPoint演示文稿?

问题描述 投票:0回答:1

我在使用以下代码时遇到问题:

Presentation ppt = new Presentation();

我如何知道要查找和引用哪个DLL?

c# dll powerpoint
1个回答
1
投票

假设您安装了Microsoft Office,请按照下列步骤操作:

  1. 打开Project菜单>添加参考> COM选项卡> Microsoft PowerPoint xx.x Object LibraryAdd Reference
  2. 在文件顶部添加以下using语句: using Microsoft.Office.Interop.PowerPoint;
  3. 确保引用的Embed Interop Type属性设置为true: Embed Interop Type
  4. 显然,您还需要在客户端计算机上安装Microsoft Office。
© www.soinside.com 2019 - 2024. All rights reserved.