excel vba - When to use TextFrame or TextFrame2 in VBA -
example, in powerpoint:
represents text frame in shape object. contains text in text frame , properties , methods control alignment , anchoring of text frame.
represents text frame in shape or shaperange object. contains text in text frame , exposes properties , methods control alignment , anchoring of text frame.
so textframe2 refers shaperange
object, , has few more properties textframe.
i not sure when or whether should use 1 or other, example, manipulate text values held in table cells on powerpoint slide. both seem work, , following statement returns true
.
dim tbl 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
is there definitive guide on when should use textframe
vs when should use textframe2
?
according jon peltier here: http://peltiertech.com/programming-excel-2007-2010-autoshapes-with-vba/
"the textframe2 member added in excel 2007 , gives better control on formatting of text. because not backward compatible, recommend using textframe object"
i'm guessing similar situation applies in ppt.
Comments
Post a Comment