Can you please help me in writing a code to delete images from a particular slide in powerpoint using C#
A:
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
Bass
2010-01-28 12:12:12
This code works when you select anything from ppt . But i want to delete slides based on the slide name or slide number
Himaja
2010-01-29 04:35:35
That's not what you asked, you wanted "a code to delete images from a particular slide" .
Bass
2010-01-29 17:36:32