XlHAlignCenter, xlHAlignCenterAcrossSelection, xlHAlignDistributed, xlHAlignFill, xlHAlignGeneral, xlHAlignJustify, xlHAlignLeft, xlHAlignRight The application that created the shape object (similar to the Application property) If True, then the size of the text frame on the shape will be adjusted to fit its text If True, then the values of the other margin properties (MarginBottom, MarginLeft, MarginRight, MarginTop) will be ignored The application that created the shape object TextFrame has many properties that can be manipulated to present it in a desirable format. The result of the above code is shown as follows. 'assume we already have a shape on the active sheet, and we set its text to Hello World.ĪctiveSheet.Shapes(1). = “Hello World”ĪctiveSheet.Shapes(1).TextFrame.Characters(1,1).Font.Bold = TrueĪctiveSheet.Shapes(1).TextFrame.Characters(7,1).Font.Bold = True Then, it sets the First letter (H) and the seventh letter (W) to bold. The following code sets the text of the characters method to “Hello World”. The Characters method can have its text value set and the various text properties as well such as the font bold, font, etc. If set to 1 or omitted then all of the text will be returned. It takes two optional parameters start and length, given that we set the text property of the Characters method. The only method in the TextFrame object is the Characters method. This object includes one method and 15 properties. rectangle, circle, etc.), we can control the text associated with the shape through the TextFrame object. A TextFrame object is used to manipulate various elements of the text frame –basically a box of text - related to shape objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |