Description
An Object property provides an access to PowerPoint.Presentation COM interface that represents currently loaded presentation.
You can use this property to get a direct access to PowerPoint presentation structure and get additional information about presentation using Office automation. You can get a detailed information about PowerPoint Object Model on MSDN web site.
Type:
Object that corresponds to PowerPoint.Presentation COM interface
(read only)
The following C# sample illustrates how to open PowerPoint presentation using FlashSpring, get PowerPoint.Presentation object and print all slide titles of presentation to console.
Please note that you must add following COM libraries to references of your project:
Microsoft Office 9.0 Object Library or higher
Microsoft PowerPoint 9.0 Object Library or higher
To add these libraries right click on References folder in your solution explorer and choose "Add Reference..."

Add Reference window will be opened.
On COM tab choose additional COM libraries and click OK.

Please note that PowerPoint 2000 or higher must be installed to make this sample work.
using System;
using System.Collections.Generic;
using System.Text;
using Office;
using PowerPoint;
namespace flashspring_samples
{
class PresentationInfo
{
static void Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("03_access_presentation.exe <input Ppt>");
return;
}
// Create FlashSpring Instance
FlashSpringAPI.FlashSpring fs = new FlashSpringAPI.FlashSpring();
try
{
// Open presentation file passed as first command line parameter
fs.OpenPresentation(args[0]);
// Please note that it is needed to use explicit cast from Object to PowerPoint.Presentation
PowerPoint.Presentation pres = (PowerPoint.Presentation)(fs.Presentation.Object);
foreach (PowerPoint.Slide slide in pres.Slides)
{
Console.Write("Slide " + slide.SlideIndex + ": ");
if (slide.Shapes.HasTitle == MsoTriState.msoTrue)
{
PowerPoint.Shape titleShape = slide.Shapes.Title;
if (
(titleShape.HasTextFrame == MsoTriState.msoTrue) &&
(titleShape.TextFrame.HasText == MsoTriState.msoTrue)
)
{
Console.WriteLine(titleShape.TextFrame.TextRange.Text);
}
else
{
Console.WriteLine("-");
}
}
}
}
catch (Exception)
{
Console.WriteLine("Error: " + fs.LastErrorDescription);
}
}
}
}