Как удалить данные из слайда PowerPoint с помощью кода C # - PullRequest
0 голосов
/ 28 января 2010

Не могли бы вы помочь мне в написании кода для удаления изображений с определенного слайда в powerpoint с помощью C #?

1 Ответ

1 голос
/ 28 января 2010

Если у вас 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, чтобы вы могли достичь желаемого точно

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...