Refresh text size/layout in PowerPoint/PPTX with OpenXML.Presentation

Viewed 38

I made a PowerPoint template where one of the text boxes is configured with a font size, a fixed height and width, and "Shrink text on overflow".

I read the PPTX in a web service, replace the text inside the text box, and send the finished document to the client. Regularly the text inside the box is more than would fit within the box with the default font size. However, when the PPTX from the server is opened by the client, the text is still overflowing outside the bounds of the text box. Only after for example duplicating the slide will PowerPoint adapt the font size in the text box to let the text fit.

How can I force PowerPoint to already update the layout when first opening/displaying the document, instead of only when actually modifying the document manually? I tried setting each and every "dirty" attribute inside the slide XML, as I was confident this would force PowerPoint to recalculate the layout, but didn't actually help.

Any ideas on the issue? My only other option would be to open the document via automation on the server and force the layout update there.

Thanks in advance!

0 Answers
Related