PowerPoint 2007 Compatibility

I would like to do the following operations in PowerPoint 2007 presentation(PPTX or PPSX) using c#. I have already spent a few times for this, but failed to find out a method for it. I want to know whether it is possible or not. If the answer is ‘Yes’ please give me the codes to do that.

  1. Add an extra slide to PPTX file.
  2. Insert and embed picture to a PPTX file.
  3. Create slide thumbnails of a PPTX file.

I have done all these operations for a PowerPoint 2003 presentation in c#. Please guide me to do all of these in PPTX file.

Thanks & Regards
Albert.

Hello,

1- You can add extra slide or any other slide using the Slide Cloning technique. An example of this can be found in this code, because it splits the presentation using the slide cloning technique.

How to split the PPTX presentation into individual slides?

2- I will coordinate with development team about this feature of adding pictureframe and let you know.

3- Thmbnails cannot be created as yet, but will be added soon.

Thanks a lot for your reply. My application contains number of PowerPoint presentations, which may be in PPTX or PPT format. I want to edit all. So please give me details about features which are not supported by Aspose for PowerPoint 2007(PPTX, PPSX) presentations.

Many Thanks and Best Regards,
Albert

Hello,

Please see the code below to add a Picture Frame inside a PPTX presentation.

I have attached the source and output presentation for your reference.

To run this code, please use the latest version of Aspose.Slides for .NET 3.1.0

C#

//Read the source presentation which has a single blank slide
PresentationEx pres = new PresentationEx(@"C:\Test\source.pptx");

//Get the first slide
SlideEx sld = pres.Slides[0];

//Read the image from disk
Image img = Bitmap.FromFile(@"C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpg");

//Add the image inside the presentation
//and save the extendend image object for later use
ImageEx imgEx = pres.Images.AddImage(img);

//Add the picture frame with extended image
sld.Shapes.AddPictureFrame(ShapeTypeEx.Rectangle, 60, 70, 600, 400, imgEx);

//Write the presentation on disk
pres.Write("c:\\test\\output.pptx");