How to delete data from a powerpoint slide using C# code
Can开发者_如何学编程 you please help me in writing a code to delete images from a particular slide in powerpoint using C#?
If you have Visual studio 2008 choose PowerPoint add-in template.
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();
}
but i recommend that you read more on the Microsoft add-in so you can achieve what you want exactly
精彩评论