Dear Team,
I am trying to use the belowsaid code to generate a PPT. Powerpoint when I launch is saying the file is corrupting and is attempting to repair it. All I need is to have a slide in the PPT with a caption and insert an image below. Can you help me where I am going wrong.
The desktop PPT is 2016
Presentation pptDocument = new Presentation();
ISlide defaultSlide = pptDocument.Slides[0];
IAutoShape shape = defaultSlide.Shapes.AppendShape(ShapeType.Rectangle, new RectangleF());
shape.Fill.FillType = Spire.Presentation.Drawing.FillFormatType.None;
shape.AppendTextFrame("Hello World");
shape.TextFrame.Paragraphs[0].TextRanges[0].LatinFont = new TextFont("Arial Black");
shape.TextFrame.Paragraphs[0].TextRanges[0].Fill.FillType = FillFormatType.Solid;
shape.TextFrame.Paragraphs[0].TextRanges[0].Fill.SolidColor.Color = Color.Black;
pptDocument.SaveToFile(strEffortPptPath, FileFormat.Pptx2010);
pptDocument = null;