2010-01-28 33 views

回答

1

如果您有Visual Studio 2008,請選擇PowerPoint加載項模板。

public partial class ThisAddIn 
{//this is the event of the startup of the powerpoint 
    private void ThisAddIn_Startup(object sender, System.EventArgs e) 
    {//this is the event that will trigger when you select anything in you presentation 
     this.Application.WindowSelectionChange += new Microsoft.Office.Interop.PowerPoint.EApplication_WindowSelectionChangeEventHandler(Application_WindowSelectionChange); 
    } 

    void Application_WindowSelectionChange(Microsoft.Office.Interop.PowerPoint.Selection Sel) 
    { 
     //here you will delete the selected item 
     Sel.Delete(); 
    } 

,但我建議你閱讀更多關於微軟插件這樣你就可以實現你想要的究竟是什麼

+0

當您從PPT什麼此代碼的工作。但是我想刪除基於幻燈片名稱或幻燈片號碼的幻燈片 – Himaja 2010-01-29 04:35:35

+0

這不是你問的問題,你想要一個「從特定幻燈片中刪除圖像的代碼」。 – 2010-01-29 17:36:32

相關問題