2010-01-28 35 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

相关问题