thanks for helps
i have a text needed to be written into Powerpoint slides automatically. But i have problem with the text. That text is longer than the textbody in the slide, so it should create another slide and the part of the text that doesnt fit into one slide should be written into the 2nd slide by the program.
I thought that if i got the height and width of the textbody, i could get rid of the problem.
Shortly either i need to get height and width of the textbody.
TextBody is the child element of Shape object. TextBody as such does not have height/width properties. Transform2D is a property of every Shape. You can get this using Shape->ShapeProperties->Transform2D.
Height and Width are identified as Extents.Cx and Extents.Cy in Transform2D (they will be in EMU).
You have to make use of Height & Width (after converting them into pixels perhaps..) to check the overflow. As per my experience, you cannot do it directly. You need to create a panel/htmlpanel which will have the above calculated height & width. Set its vertical Scroll property to Auto. If you have a larger paragraph, split it into set of sentences. Try to draw each sentence into the panel. After adding each sentence, check for (vertical Scroll)==true? If it is true, it means the panel cannot hold that particular sentence, in other words, the TextBody cannot have this sentence. So, add a new slide with the same layout, and add the rest of the sentences to that (you need do the overflow check every time you add a sentence)