I am doing a merge of data from a google spreadsheet to a slides presentation using placeholder shapes and apps script, something along the lines of this example.
I have the merge working well. The first issue I am having though is that the text is not bound by the shape that contains it. If the text does not fit within the bounding shape it simply overflows:
That wouldn't be such a problem if I could then somehow tell programmatically that the text has overflowed. As far as I can tell though I can only get the height of the bounding shape. Which doesn't change even though it now "contains" text that covers a much greater height on the slide. I don't seem to be able to get the height of the actual text.
Is there any way to tell what the height of the textrange is, or that it has overflowed, so that I can then either adjust some feature of the text (the font size, or the length of the actual text, etc) so that the text is bound by the textbox? Or at least alert the user that the text has overflowed.
The PowerPoint equivalent of this would be textrange.boundheight if that helps describe the property I am looking for, with a similar property I would then hopefully be able to implement something similar to the AutoSize feature.
The merge of text to a slide without some way to fit the text to the placeholder shapes doesn't seem that useful to me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…