Guide for C#
Core Document Formats
Additional Features

C# PowerPoint - Add, Insert & Delete Slide

How to Add, Insert and Delete PowerPoint Slide in C#.NET

Visual C#
Home > .NET Imaging SDK > C# > PowerPoint: Add, Insert & Delete Slide
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

C# PowerPoint Slide Processing Add-On Introduction
With our C#.NET PowerPoint Slide Processing Add-On, developers may feel easy to add, insert or delete PowerPoint document page (slide) through C#.NET programming. If a certain slide needs to be added, you can append it to the end of your PowerPoint document by using the adding function of this C#.NET PowerPoint Slide Processing Control. It also enables you to insert an existing slide into any position you specify in the PowerPoint document or create a new slide and insert it into the PPT file within C#.NET project. Sometimes, we may find some slides unnecessary. In such cases, you can use this C#.NET PPT control to delete unwanted slides from your PowerPoint document easily.
Related .net document control helps:
asp.net document viewer free: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...
document viewer asp.net c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
asp.net dicom web viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net pdf editor control: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net edit pdf text color: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net display tiff images: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net annotate pdf control: ASP.NET Annotate PDF Control: annotate, comment, markup PDF document online using ASP.NET C#
In order to use this PowerPoint Slide Processing Library for C#.NET to add, insert and delete PowerPoint document slides in your C#.NET application, please make sure that proper .NET environments are available. This PowerPoint Slide Processing Library for C#.NET can be used in .NET Framework 2.0, 3.0, 3.5, 4.0 or 4.5. What's more, it can be used in C#.NET project created in Visual Studio 2005 or later versions. For operating systems, many Windows operating systems are available, such as Windows 2000, Windows XP, Windows 7 and more.
We offer a specific C#.NET guide to help you add, insert and delete PowerPoint document slides by using our C#.NET PowerPoint Slide Processing Add-On. On this guide page, you will find such useful information as:
  • C#.NET classes used to add, insert and delete PowerPoint document slide
  • API and C# sample code for adding slide to the end of the PowerPoint document
  • API and C# sample code for inserting slide at any position of the PPT file
  • API and C# sample code for deleting unwanted slide(s) from the PPT document
  • Other C#.NET Microsoft PowerPoint slide processing guides for developers
C# Classes to Add, Insert & Delete PowerPoint Slide
To add, insert and delete PowerPoint slide in C#.NET project with our PowerPoint Processing Control for C#.NET, PPTXDocument and PPTXPage classes are required. In our program, PPTXDocument object is treated as an abstraction of the PowerPoint file and it includes all slides and properties for PowerPoint documentation. PPTXPage is an abstraction of a slide included in PPTXDocument.
API and C# Sample Code to Add PowerPoint Slide
You can add and append a slide to the end of your PowerPoint document by using the following API and C#.NET demo code.

Use API Below to Add PowerPoint Document Slide

void PPTXDocument.AddPage(BasePage page);

C#.NET Demo Code for Adding PowerPoint Doc Slide

/// <summary>
/// Add slide to the end of the PowerPoint document.
/// </summary>
/// <param name="doc"></param>
/// <param name="page"></param>
public void AddPageToDocument(PPTXDocument doc, PPTXPage page)
{
doc.AddPage(page);
}
API and Demo Code to Insert PowerPoint Slide in C#
C#.NET developers are free to use API and sample code below to insert an existing slide or newly created slide into the PowerPoint document.

API for Inserting PowerPoint Page to Specified Position in C#

void PPTXDocument.InsertPage(BasePage page, int pageIndex);

C# Sample Code to Insert PowerPoint Document Slide Using C#

/// <summary>
/// Insert a slide to PowerPoint document.
/// </summary>
/// <param name="doc"></param>
/// <param name="page"></param>
/// <param name="idx"></param>
public void InsertPageToPPTXDocument(PPTXDocument doc, PPTXPage page, int idx)
{
doc.InsertPage(page, idx);
}


/// <summary>
/// Create an empty page and insert it into an existing PPTXDocument.
/// </summary>
/// <param name="doc"></param>
/// <param name="idx"></param>
public void CreateAndInsertEmptyPage(PPTXDocument doc, int idx)
{
PPTXPage page = new PPTXPage();
doc.InsertPage(page, idx);
}
API and C# Sample Code to Delete PPT Document Slide(s)
If you want to delete unnecessary slide(s) from your PowerPoint document in C#.NET application, just copy the following API and demo code to your project.

API for Deleting Unwanted PowerPoint Doc Slide(s) in C#.NET

void PPTXDocument.DeletePage(int pageIdx);

Demo Code Used to Delete Microsoft PowerPoint Slide(s) in C# Class

/// <summary>
/// Delete pages from PowerPoint document.
/// </summary>
/// <param name="filePath"></param>
/// <param name="pageIndx"></param>
public void DeletePage(String filePath, int pageIndx)
{
PPTXDocument doc = new PPTXDocument(filePath);
doc.DeletePage(pageIndx);
}
Other PowerPoint Slide Processing Guides in C#.NET
We not only offer this C#.NET PowerPoint slide adding, inserting and deleting guide, but also provide guides for other functions of this PowerPoint Slide Processing Add-On for C#.NET. With corresponding step-by-step C#.NET guide, you may find it easier to finish certain PowerPoint slide processing. Please click the link below to view detailed guide for each PowerPoint slide processing operation in C#.NET.


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com