When to use TextFrame or TextFrame2 in VBA

后端 未结 2 2022
灰色年华
灰色年华 2021-02-07 09:39

Example, in Powerpoint:

The TextFrame object:

Represents the text frame in a Shape object. Contains the text in the text frame and the propertie

相关标签:
2条回答
  • 2021-02-07 10:08

    According to Jon Peltier here: http://peltiertech.com/programming-excel-2007-2010-autoshapes-with-vba/

    "The TextFrame2 member was added in Excel 2007 and gives better control over the formatting of the text. Because it is not backward compatible, I would recommend using the TextFrame object"

    I'm guessing a similar situation applies in PPT.

    0 讨论(0)
  • 2021-02-07 10:11

    In addition, TextFrame doesn't contain the property LanguageID in macOS, so you're forced to use TextFrame2. Be aware of that if you're working with that property in a cross-platform environment. I faced that problem in the past.

    0 讨论(0)
提交回复
热议问题