Free Support Forum - aspose.com

Font information lost when cloning a slide

When I clone a slide using Presenation.CloneSlide() the font information for the texts I have in the slide is lost somehow.<br><br>It's fairly simple: I have a presentation I use as a template for creating the new slides. I open this, clone the only slide in it (it's a normal slide, not a template or master slide since I couldn't get whatever layout I wanted with them), find the rectangles with the text in, one is title and one is a sub-title basically. I replace whatever text is in them with what I want to put there. Repeat however many times is necessary. Then I delete the slide I clone to do this and then I save to disk.<br><br>When I open them, the texts don't have the correct font (Arial Unicode MS), correct size or anything. This is very critical to me. Is this a known issue or something that I have to work around somehow?<br><br>Thanks in advance!<br>

Thank you for the report.
Please, could you provide source ppt files and example of code you use for slide cloning.

Done and done.

I have attached a solution written in C# using Visual Studio 2005 that uses basically the exact same code as I use in my project and it gives the same result, font information is lost.

Cheers!

No more information about this? Have you managed to test my sample?<br><br>Cheers!<br>

Sorry, I didn’t get notification about your post with files and didn’t see it before.
Well, really this problem can be fixed easy enough.

You use this code:
textholders[key].TextFrame.Text = "…"

In this case all formatting of text frame is reset to default.
To save all formatting and change only text you should change separate paragraphs and portions.
If TextFrame has only one paragraph and one portion then it will look like this:
textholder[key].TextFrame.Paragraps[0].Portions[0].Text = “…”

That worked perfectly, thanks alot for the assistance.<br><br>//T<br>