Opening a Presentation in VSTO and Aspose.Slides
Contents
[
Hide
]
VSTO
Below is the code snippet for opening presentation:
string FileName = "Open Presentation.pptx";
Application.Presentations.Open(FileName);
Aspose.Slides
Aspose.Slides for .NET provides Presentation class that is used to open an existing presentation. It offers few overloaded constructors and we can make use of one of the suitable constructors of Presentation class to create its object based on an existing presentation.In the example given below, we have passed the name of the presentation file (to be opened) to the constructor of Presentation class. After the file is opened, we get the total number of slides present in the presentation to print on the screen.
string FileName = "Open Presentation.pptx";
Presentation MyPresentation = new Presentation(FileName);
Download Running Code
Download Sample Code
- [Codeplex](https://asposevsto.codeplex.com/SourceControl/latest#Aspose.Slides Vs VSTO Slides/Opening a Presentation/)
- Github