Free Support Forum - aspose.com

SlideSizeType will change if clear all portions in a paragraph (MS PPT 2000)

Hi,

I have problem with ppt output opened in MS Powerpoint 2000 (not happen in 2003 & 2007).

I found that if a paragraph does not have any portion, there is nothing in slide.

See code below for example:

Presentation pptDoc = new Presentation();
pptDoc.SlideSizeType = SlideSizeType.Custom;
Slide slide = pptDoc.AddEmptySlide();
Picture pic = new Picture(pptDoc, picPath);
int picId = pptDoc.Pictures.Add(pic);

int width = pic.Image.Width * 576 / 96;
int height = pic.Image.Height * 576 / 96;
slide.Shapes.AddPictureFrame(picId, 100, 100, width, height);

Aspose.Slides.Rectangle _textbox = slide.Shapes.AddRectangle(100, 400, 500, 100);
_textbox.LineFormat.ShowLines = false;
TextFrame textFrame = _textbox.AddTextFrame(string.Empty);
Paragraph _currentParagraph = textFrame.Paragraphs[0];
_currentParagraph.Portions.Clear(); //problem here

pptDoc.Slides.RemoveAt(0);
pptDoc.Write(“C:\output.ppt”);
No problem in Powerpoint 2003 & 2007. But if I open the output by using Powerpoint 2000, there is no picture on the slide, and the blank slide type changed to Title-Content slide type.
I also attach output. You should try to open it in MS PPT 2000.

Please help me to resolve this problem in Powerpoint 2000.

Thanks