簡體   English   中英

創建PowerPoint演示文稿需要什么參考?

[英]What reference do I need in order to create a PowerPoint presentation?

我在使以下代碼正常工作時遇到問題:

Presentation ppt = new Presentation();

我怎么知道要查找和引用哪個dll?

假設您已安裝Microsoft Office,請按照下列步驟操作:

  1. 打開Project菜單>添加引用> COM選項卡> Microsoft PowerPoint xx.x Object Library

    添加參考

  2. 在文件頂部添加以下using語句:

     using Microsoft.Office.Interop.PowerPoint; 
  3. 確保引用的Embed Interop Type屬性設置為true:

    嵌入式互操作類型

  4. 顯然,您還需要在客戶端計算機上安裝Microsoft Office。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM