Guide for VB.NET
Core Document Formats
Get to Start - Create, Load, Save
Additional Features

VB.NET PowerPoint - Get Started in PPT Program

VB.NET Codes to Create, Load and Save PowerPoint Document

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

When you are using or about to apply RasterEdge VB.NET PowerPoint Document SDK, you may feel a little confused about how to get started with this comprehensive and mature PPT document manager on creating, loading and saving PPT file. This page will help you handle this problem on following aspects:
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 edit pdf page: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net pdf viewer control: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net dicom web viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in 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...
  • What is RasterEdge VB.NET PowerPoint document toolkit?
  • How to use this mature PowerPoint document library to create a blank PPT file with VB.NET class?
  • If I want to get the total number of a certain PPT file as soon as loaded in VB.NET project, in what way can I achieve it?
  • How can I save and store the created or processed PPT document to memory stream or native file in VB.NET program?
About This SDK
Specifically speaking, this VB.NET PowerPoint presentation document control of RasterEdge .NET Imaging SDK has been developed and provided to help users view and manipulate PPT file, which plays a vital part in communicating ideas though information contained in each PPT slide (we treat each PPT slide within our PPT document SDK as individual page).
This page mainly focuses on how users can get started by using this perfect VB.NET PPT document control with document pre-processing functions, including loading, creating and saving PowerPoint file. And you may easily achieve these with the help of completely free demo methods and sample codes in VB.NET programming language.
Still, you can go to PowerPoint annotation module in VB.NET to get well informed about how to draw and create various annotation shapes on a specific PPT page, and use the PPT slide processing component for VB.NET to finish PPT page/slide adding, inserting, deleting & extracting.
If you are developers using C#, you can directly link to Getting started with PowerPoint project in Visual C#.NET.
How to
In order to offer users with clear VB.NET starting guide for PPT document, we divide this page into three parts:
  • How to use sample API and code in VB.NET to create an empty PowerPoint file with our reliable .NET PPT document add-on
  • How to apply VB.NET demo APIs and example codes to load PPT document from memory or local file and get the exact PPT slides number
  • How to save PowerPoint document to memory or native file via copy-and-paste the demo Visual Basic .NET code

Create PowerPoint File

VB.NET method and sample code in this part will teach you how to create a fully customized blank PowerPoint file by using the smart PowerPoint presentation control. Here are the example to get you started.
Please refer to following API to create and define a new blank PowerPoint document with a user-defined presentation slides count.
Private Sub New(pageNum As Integer)
End Sub
Use VB demo code below directly to create an empty PowerPoint document with a particularized file name.
''' <summary>
''' Create an empty PowerPoint document.
''' </summary>
''' <returns></returns>
Public Function CreatePPTXDocument(pageNum As Integer) As PPTXDocument
Return New PPTXDocument(pageNum)
End Function
Code instructions:
  • "int pageNum": can be used to specify the PPT slides number. For example, if you need to create a PowerPoint document in 5 slides, you may just input "5" in the demo code.

Load PPT Document

If you want to do any further PowerPoint viewing or processing within VB.NET project, you are supposed to load the source PPT document at first. By using this marvelous VB.NET PPT file starting program, you can load and embed target PowerPoint from both local file and memory with sample methods and codes below.
Check following APIs for loading PPT presentation from file and stream.
''' Load a present PowerPoint document in local file.
Private Sub New(filePath As [String])
End Sub
''' Load from Stream.
Private Sub New(sourceStream As Stream)
End Sub
Use following sample VB codes to load a certain PowerPoint document.
''' <summary>
''' Load PPTXDocument from native PowerPoint file.
''' </summary>
''' <param name="filePath"></param>
''' <returns></returns>
Public Function LoadPPTXDocumentFromFile(filePath As [String]) As PPTXDocument
Return New PPTXDocument(filePath)
End Function


''' Load PPTXDocument from stream.
Public Function LoadPPTXDocumentFromStream(sourceStream As Stream) As PPTXDocument
Return New PPTXDocument(sourceStream)
End Function
Besides, users also can get the precise PowerPoint slides count as soon as the PowerPoint document has been loaded by using the page number getting method.
Private Function GetPageCount() As Integer Implements PPTXDocument.GetPageCount
End Function
''' <summary>
''' Get page (slide) count of a PPTXDocument object.
''' </summary>
''' <param name="doc"></param>
''' <returns></returns>
Public Function GetPageCount(doc As PPTXDocument) As Integer
Return doc.GetPageCount()
End Function

Save PPT File

Contrary to PowerPoint document inputting and loading, users can certainly export and save the PPT file after the creating or editing. Also, PPT file within VB.NET project can be saved in the form of local path or memory stream. Please see following demo methods and codes.
''' Save as local PowerPoint document file.
Private Sub Save(filePath As [String]) Implements PPTXDocument.Save
End Sub
''' Save to stream.
Private Sub Save(s As Stream) Implements PPTXDocument.Save
End Sub
''' <summary>
''' Save PPTXDocument object to file in the native file format.
''' </summary>
''' <param name="doc"></param>
''' <param name="filePath"></param>
Public Sub SavePPTXDocument(doc As PPTXDocument, filePath As [String])
doc.Save(filePath)
End Sub


''' <summary>
''' Save PPTXDocument to stream
''' </summary>
''' <param name="doc"></param>
''' <param name="s"></param>
Public Sub SavePPTXDocument(doc As PPTXDocument, s As Stream)
doc.Save(s)
End Sub


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