none
Compute max number of characters for a shape

    Question

  • Sorry for my English :)

    I know shape's (on the slide) width, height, and its text font size. Is there a way to define max number of characters which shape can contain?

    I need just an approximate number because I realize to find out exact number I also should consider parameters like line spacing. 










    lundi 9 juillet 2018 21:54

Réponses

  • Hello adamShakhabov,

    Max number? It sounds like the limit number of characters in PPT shape. If so, as far as I know, OpenXML does not provide such property and I even wondering PPT have a characters limit in shape.

    Besides, if you mean the count number of the characters in a shape. You could try to get its content string using Shape.InnerText and the count the characters on the string.

    Such as 

                            string ShapeText = shape.InnerText;
                            MessageBox.Show("Characters number of the shape is: " + ShapeText.Length.ToString());

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marqué comme réponse adamShakhabov lundi 16 juillet 2018 15:19
    mardi 10 juillet 2018 06:16
    Modérateur