Guide for VB.NET
Core Document Formats
Additional Features

VB.NET PowerPoint - Sort and Set Slides Order

Sort and Reorder PowerPoint Slides Range with VB.NET PPT Manipulation Library

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

When you are about to change the positions of single or several PowerPoint presentation slides/pages within Microsoft Office PowerPoint software, you can simply select one or more slide icons, and then drag the selection to the desired location on the Outline tab in normal view or choose one or more slide thumbnails and drag to specific position on the Slide tab in normal view. These are how you work out PPT pages sorting by using a client-side PPT software, and have you wondered how PPT slides can be sorted and reordered with a .NET PowerPoint slides sorting control in VB.NET program, just like - RasterEdge VB.NET PPT Slides Sorting and Reordering Library.
Related .net document control helps:
asp.net pdf viewer using c#: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net edit pdf page using c#: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
c# asp.net text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
c# asp.net tiff viewer: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net mvc excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
asp.net edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
This page will teach you to rearrange and readjust current PPT slides order by handling problems below:
  • What are required to sort PPT slides/pages and how to create a VB.NET-compatible PPT document pages sorting project?
  • What is the PPT slides/pages sorting method exactly and how does it work in Visual Basic .NET programming project?
  • Is there any free sample code for reordering PowerPoint slides/pages by using this VB.NET PowerPoint handling control?
Sorting Project
In order to integrate and apply our VB.NET PPT presentation sorting library accurately, we suggest users should read this part carefully to have a good preparation.

.NET References

  • RasterEdge.Imaging.Basic.dll: a fundamental .NET imaging library for VB.NET application that is indispensable for all image or document (PowerPoint) operations within any .NET platform.
  • RasterEdge.Imaging.MSPPT.dll: if you need to activate and use RasterEdge PowerPoint Library for PPT document viewing (in Windows, web and mobile applications), annotating, slide processing and many other manipulations, you may need to invite and incorporate this assembly to your VB.NET program.

VB.NET Program

Creating a VB.NET-compliant PPT document project is the basic operation for applying this PPT document slides sorter. User just need to start your Visual Studio 2005, 2008, 2010 or 2012 and build a .NET Windows or web application with VB.NET programming language, and then embed and integrate the relevant "RasterEdge.Imaging.Basic.dll" and "RasterEdge.Imaging.MSPPT.dll" libraries to your VB.NET project. Note: for advanced functions, like PowerPoint barcoding, annotating, document viewer creating etc., more relevant DLL libraries should be added to project reference as well.
API Template
If your VB.NET program PowerPoint (.pptx) document has been displayed in a disordered range or incautiously scanned in a wrong range, you will need a mature .NET PPT slides/pages sorting tool. Here, we provide API of sorting method below to you to change and adjust the order of slides in a PPT presentation.
API and method below is completely compliant within VB.NET developing environment as well as other .NET applications, such as, C#.NET, ASP.NET and .NET Windows Forms. Thus, we still offer the precise online guide for sorting PPT slides within C#.NET program.
Private Sub SortPage(pageOrder As List(Of Integer)) Implements PPTXDocument.SortPage
End Sub
APIs and methods notices:
  • pageOrder: this PPT slides/pages sorting method requires inputting of new order of slides/pages. For example, if you want to view the PPT presentation in VB.NET with an inverted order, you are supposed to manually input "5 4 3 2 1".
  • The new adjusted and reordered PPT pages range can be in any mode. Namely, you can choose to show your PPT presentation in inverted order like exampled above, or in a random order, like "4 2 3 1 5" or change a certain slide at the first page and the others remain the same, like "4 1 2 3 5".
Code Example
Please refer to following easy-to-use VB.NET sample code to sort PowerPoint slides/pages order.
''' <summary>
''' Sort PowerPoint document in designated order.
''' </summary>
''' <param name="doc"></param>
''' <param name="pageIdxes"></param>
Public Sub sortDocumentBackToFront(doc As PPTXDocument)
' Slide index starts at one.
Dim pageCount As Integer = doc.GetPageCount()
Dim correctOrder As New List(Of Integer)()
For i As Integer = 0 To pageCount - 1
Dim index As Integer = i + 1
If i = 0 Then
' Switch the first and last slides.
index = pageCount
End If
If i = pageCount - 1 Then
' Switch the first and last slides.
index = 1
End If
correctOrder.Add(index)
Next

' Sort the PowerPoint slides using the correct order.
doc.SortPage(correctOrder)
End Sub
Still See
PowerPoint slides/pages sorting is a main feature of PPT manipulations in VB.NET. With RasterEdge .NET PowerPoint document manipulating SDK, other PPT document applications can be achieved within VB.NET program like below (name a few here).

PPT Page Extracting

VB.NET PowerPoint slide extracting is a marvelous PPT slide handling feature which can be fast achieved within both single-threaded and multi-threaded Visual Basic .NET applications to extract and export single or a few PPT slides/pages at one time with the simplest VB demo codes.

PPT Image Adding

Use this smart .NET PowerPoint SDK, you may easily VB.NET PPT image adding and inserting APIs to insert image, clip art or screenshot to PowerPoint document slide at a user-defined location.

More PPT Processing

VB.NET PPT document processing SDK contains a large amount of robust PPT slides/pages editing methods and APIs that are 100% compatible with both VB.NET Windows and ASP.NET programs.


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