0
您能否幫我編寫一個代碼,以使用C#從Powerpoint中的特定幻燈片中刪除圖像?如何使用C#代碼刪除Powerpoint幻燈片中的數據
您能否幫我編寫一個代碼,以使用C#從Powerpoint中的特定幻燈片中刪除圖像?如何使用C#代碼刪除Powerpoint幻燈片中的數據
如果您有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();
}
,但我建議你閱讀更多關於微軟插件這樣你就可以實現你想要的究竟是什麼
當您從PPT什麼此代碼的工作。但是我想刪除基於幻燈片名稱或幻燈片號碼的幻燈片 – Himaja 2010-01-29 04:35:35
這不是你問的問題,你想要一個「從特定幻燈片中刪除圖像的代碼」。 – 2010-01-29 17:36:32