例如,在Powerpoint中:
Represents the text frame in a Shape object. Contains the text in the
text frame and the properties and methods that control the alignment
and anchoring of the text frame.
Represents the text frame in a Shape or ShapeRange object. Contains
the text in the text frame and exposes properties and methods that
control the alignment and anchoring of the text frame.
所以TextFrame2也引用ShapeRange对象,它比TextFrame还有一些属性.
我不太确定何时或是否应该使用一个或另一个,例如,操纵powerpoint幻灯片上的表格单元格中保留的文本值.两者似乎都工作,下面的语句返回TRUE.
Dim tbl as Table
Set tbl = ActivePresentation.Slides(1).Shapes("Table1").Table
tbl.Cell(r, c).Shape.TextFrame2.TextRange.Characters.Text = _
tbl.Cell(r, c).Shape.TextFrame.TextRange.Characters.Text
有什么时候应该使用TextFrame vs应该使用TextFrame2吗?