2010-01-28 3 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(); 
    } 

, но я рекомендую прочитать больше на Microsoft надстройка, так что вы можете добиться того, что вы хотите точно

+0

Этот код работает, когда вы выбираете что-нибудь из п.п.. Но я хочу удалить слайды на основе имени слайда или номера слайда – Himaja

+0

Это не то, что вы просили, вам нужно «код для удаления изображений с определенного слайда». –

Смежные вопросы