Guide for VB.NET
Core Document Formats
Additional Features

VB.NET PowerPoint - Guide for Extracting PPT Slide

How to Extract PowerPoint Slide(s) and Merge Collected PPT Slide(s) in VB.NET

VB.NET
Home > .NET Imaging SDK > VB.NET > PowerPoint: Slide Extraction
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

How to collect useful or desired slide(s) from PowerPoint .pptx document file using VB.NET code programmatically? Divided in following several aspects, this VB.NET online tutorial page will introduce you a professional .NET solution which makes it extremely easy to collect one or a list of slides extracted from PPT (.pptx) file(s) using VB.NET PPT slide extractor control add-on.
Related .net document control helps:
asp.net image viewer jquery: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
asp.net edit pdf image control: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
powerpoint viewer asp.net mvc: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
asp.net document viewer free: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS...
asp.net pdf editor control: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net image viewer jquery: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
  • How to extract and collect slide(s) from source PowerPoint document file(s) using VB.NET API?
  • What VB.NET demo code can be used for PPT slide extraction in .NET developing application?
Slide Extracting APIs
From this section, you can find mature VB.NET APIs for extracting one slide or multiple slides from PowerPoint .pptx document file(s) without using any external PowerPoint reading & editing components. In order to help you have a complete understanding of these VB.NET PPT slide extraction APIs, we will first illustrate some self-defined programming classes.
  • PPTXDocument: this class is designed as a high-level constructor of in-memory PowerPoint document file. To put it in another way, once a source PPT file is decoded into VB.NET class project as one in-memory object, this PPTXDocument class will create a corresponding PPTXDocument instance to represent it and created PPTXDocument contains all information that is stored in the loaded PPT document file.
  • PPTXPage: The concept of page within this VB.NET PowerPoint slide extractor library SDK is, in essence, the concept of slide. Thus, PPTXPage is a programming class which is used to display one slide of PPTXDocument. And this PPTXPage class is derived from super class REPage.
Another thing that needs to be mentioned here is that this VB.NET PowerPoint slide extractor library add-on owns the ability to decode PPT document file into PPTXDocument no matter whether the source PPT file is stored in the PC files as .pptx format or is saved in web server as memory stream.

One Slide Extraction

Using following VB.NET APIs, developers can extract one specified slide from source PowerPoint document file and save extracted PPT slide to desired file path as a new .pptx document file or store it to desired web path as stream.
Private Sub GetOnePageDocument(sourceFilePath As [String], index As Integer, destnStream As Stream) Implements PPTXDocument.GetOnePageDocument
End Sub
Private Sub GetOnePageDocument(sourceFilePath As [String], index As Integer, destnFilePath As [String]) Implements PPTXDocument.GetOnePageDocument
End Sub

Multiple Slides Extraction

Using the VB.NET APIs below, developers can easily extract a specified range of PowerPoint slides from one or more PPT files using VB.NET code. And similar to above VB.NET one slide extracting APIs, the APIs below also allows programmers to save extracted PowerPoint slides to local files or memory stream.
Private Sub ExtractPagesFromDocument(sourceFilePath As [String], pageIdxes As List(Of Integer), destnStream As Stream) Implements PPTXDocument.ExtractPagesFromDocument
End Sub
Private Sub ExtractPagesFromDocument(sourceFilePath As [String], pageIdxes As List(Of Integer), destnFilePath As [String]) Implements PPTXDocument.ExtractPagesFromDocument
End Sub
VB.NET Sample Code
To offer you a sample tutorial on how to collect slide(s) using above mentioned VB.NET PowerPoint slide extracting APIs, we here expressly list two corresponding VB.NET demo codes. Besides, RasterEdge also offers C# sample code on how to extract slide(s) from PowerPoint .pptx document file. Please remember to install .NET Framework 2.0, 3.0, 3.5 or later versions before testing following VB.NET PPT slide extracting demo code using RasterEdge VB.NET PowerPoint extractor library toolkit.
The VB.NET demo code below allows developers to do three PowerPoint related processing functions, which are decoding one PPT (.pptx) document from PC file into Visual Basic .NET project as an in-memory object PPTXDocument, extracting one desired slide from created PPTXDocument and saving extracted one slide to defined file path as new .pptx document file.
''' <summary>
''' Extract a single page and form a new PPT document
''' </summary>
''' <param name="filePath"></param>
''' <param name="indx"></param>
''' <returns></returns>
Public Sub GetOnePageDocument(filePath As [String], indx As Integer, modifiedFilePath As [String])
PPTXDocument.GetOnePageDocument(filePath, indx, modifiedFilePath)
End Sub
Following VB.NET sample code is quite suitable for this PowerPoint slide extracting situation: you need to collect a list of slides from PPT document 1 and PPT document 2 that are stored in your local files and you want to combine these extracted slides into a new PowerPoint .pptx document file.
''' <summary>
''' Two PowerPoint files are available, and we want to combine some pages of document 1 and some pages of document 2 to form a new PowerPoint document
''' </summary>
''' <returns></returns>
Public Sub ExtractPagesToFormNewDocument(filePath1 As [String], filePath2 As [String], pageList1 As List(Of Integer), pageList2 As List(Of Integer), destnPath As [String])
' two temporary string to store the extracted documents file paths
Dim tmpFilePath1 As [String] = "c:\tmpFile1"
Dim tmpFilePath2 As [String] = "c:\tmpFile2"

PPTXDocument.ExtractPagesFromDocument(filePath1, pageList1, tmpFilePath1)
PPTXDocument.ExtractPagesFromDocument(filePath2, pageList2, tmpFilePath2)

Dim docPathList As List(Of [String]) = New List(Of String)()

docPathList.Add(tmpFilePath1)
docPathList.Add(tmpFilePath2)

PPTXDocument.Combine(docPathList, destnPath)
End Sub
If you want to read more PowerPoint slide processing functions, like VB.NET PPT slide adding/removing, PPT merging/splitting or PowerPoint image insertion, please read this VB.NET PowerPoint slide processing tutorial page.


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