Export (0) Print
Expand All

TextRange Object Members

Office 2007

Contains the text that's attached to a shape, as well as properties and methods for manipulating the text. This topic describes how to: Return the text range in any shape you specify. Return a text range from the selection. Return particular characters, words, lines, sentences, or paragraphs from a text range. Insert text, the date and time, or the page number into a text range.

Methods

 NameDescription
Aa438838.methods(en-us,office.12).gif Characters Returns a TextRange object that represents the specified subset of text characters.
Aa438838.methods(en-us,office.12).gif Collapse Collapses a range or selection to the starting or ending position. After a range or selection is collapsed, the starting and ending points are equal.
Aa438838.methods(en-us,office.12).gif Copy Copies the specified object to the Clipboard.
Aa438838.methods(en-us,office.12).gif Cut Deletes the specified object and places it on the Clipboard.
Aa438838.methods(en-us,office.12).gif Delete Deletes the specified object.
Aa438838.methods(en-us,office.12).gif Expand Expands the specified range or selection. Returns or sets a Long that represents the number of specified units added to the range or selection.
Aa438838.methods(en-us,office.12).gif InsertAfter Returns a TextRange object that represents text appended to the end of a text range.
Aa438838.methods(en-us,office.12).gif InsertBarcode Inserts a bar code field at the end of the text range represented by the parent TextRange object.
Aa438838.methods(en-us,office.12).gif InsertBefore Appends a string to the beginning of the specified text range. Returns a TextRange object that represents the appended text. When used without an argument, this method returns a zero-length string at the end of the specified range.
Aa438838.methods(en-us,office.12).gif InsertDateTime Returns a TextRange object that represents the date and time inserted into a specified text range.
Aa438838.methods(en-us,office.12).gif InsertMailMergeField Returns a TextRange object that represents a text data field for a mail merge or catalog merge.
Aa438838.methods(en-us,office.12).gif InsertPageNumber Returns a TextRange object that represents a page number field in a publication.
Aa438838.methods(en-us,office.12).gif InsertSymbol Returns a TextRange object that represents a symbol inserted in place of the specified range or selection.
Aa438838.methods(en-us,office.12).gif Lines Returns a TextRange object that represents the specified lines.
Aa438838.methods(en-us,office.12).gif Move Collapses the specified range to its start position or end position and then moves the collapsed object by the specified number of units. This method returns a Long that represents the number of units by which the object was actually moved, or it returns 0 (zero) if the move was unsuccessful.
Aa438838.methods(en-us,office.12).gif MoveEnd Moves the ending character position of a range. This method returns a Long that represents the number of units the range or selection actually moved or returns 0 (zero) if the move was unsuccessful.
Aa438838.methods(en-us,office.12).gif MoveStart Moves the start position of the specified range. This method returns a Long that indicates the number of units by which the start position or the range or selection actually moved, or it returns 0 (zero) if the move was unsuccessful.
Aa438838.methods(en-us,office.12).gif Paragraphs Returns a TextRange object that represents the specified paragraphs.
Aa438838.methods(en-us,office.12).gif Paste Pastes the text on the Clipboard into the specified text range, and returns a TextRange object that represents the pasted text.
Aa438838.methods(en-us,office.12).gif Select Selects the specified object.
Aa438838.methods(en-us,office.12).gif Words Returns a TextRange object that represents the specified subset of text words.

Properties

 NameDescription
Aa438838.properties(en-us,office.12).gif Application Used without an object qualifier, this property returns an Application object that represents the current instance of Publisher. Used with an object qualifier, this property returns an Application object that represents the creator of the specified object. When used with an OLE Automation object, it returns the object's application.
Aa438838.properties(en-us,office.12).gif BoundHeight Returns a Single indicating the height, in points, of the bounding box for the specified text range. Read-only.
Aa438838.properties(en-us,office.12).gif BoundLeft Returns a Single indicating the distance, in points, from the left edge of the leftmost page to the left edge of the bounding box for the specified text range. Read-only.
Aa438838.properties(en-us,office.12).gif BoundTop Returns a Single indicating the distance, in points, from the top edge of the topmost page to the top edge of the bounding box for the specified text range. Read-only.
Aa438838.properties(en-us,office.12).gif BoundWidth Returns a Single indicating the width, in points, of the bounding box for the specified text range. Read-only.
Aa438838.properties(en-us,office.12).gif ContainingObject Returns an Object that represents the object that contains the text range. Read-only.
Aa438838.properties(en-us,office.12).gif DropCap Returns a DropCap object that represents a dropped capital letter for the paragraphs in the specified text frame.
Aa438838.properties(en-us,office.12).gif Duplicate Returns a TextRange object that represents a duplicate of the specified text range.
Aa438838.properties(en-us,office.12).gif End Sets or returns a Long that represents the ending character position of a selection or text range. Read/write.
Aa438838.properties(en-us,office.12).gif Fields Returns a Fields object that represents all the fields in the specified text range.
Aa438838.properties(en-us,office.12).gif Find Returns a FindReplace object from the specified TextRange object. The FindReplace object is used to perform a text search and replace in the specified text range.
Aa438838.properties(en-us,office.12).gif Font Sets or returns a Font object that represents character formatting attributes applied to the specified object. Read/write.
Aa438838.properties(en-us,office.12).gif Hyperlinks Returns a Hyperlinks collection representing all the hyperlinks in the specified text range.
Aa438838.properties(en-us,office.12).gif InlineShapes Returns an InlineShapes collection, which represents the inline shapes contained within a text range. Read-only.
Aa438838.properties(en-us,office.12).gif LanguageID Returns or sets a MsoLanguageID constant that represents the language for the specified object. Read/write.
Aa438838.properties(en-us,office.12).gif Length Returns a Long value indicating the length of the specified text range, in characters. Read-only.
Aa438838.properties(en-us,office.12).gif LinesCount Returns the number of lines of text in the text range represented by the parent TextRange object. Read-only.
Aa438838.properties(en-us,office.12).gif MajorityFont Returns a Font object that represents the font name most in use in a text range.
Aa438838.properties(en-us,office.12).gif MajorityParagraphFormat Returns a ParagraphFormat object that represents the paragraph formatting applied to most of the paragraphs in a text range.
Aa438838.properties(en-us,office.12).gif ParagraphFormat Returns a ParagraphFormat object that represents the paragraph formatting for the specified text range or text style.
Aa438838.properties(en-us,office.12).gif ParagraphsCount Returns the number of paragraphs of text in the text range represented by the parent TextRange object. Read-only.
Aa438838.properties(en-us,office.12).gif Parent Returns an object that represents the parent object of the specified object. For example, for a TextFrame object, returns a Shape object representing the parent shape of the text frame. Read-only.
Aa438838.properties(en-us,office.12).gif Script Returns a PbFontScriptType constant that represents the font script for a text range. Read-only.
Aa438838.properties(en-us,office.12).gif Start Returns or sets a Long that represents the starting character position of a text range. Read/write.
Aa438838.properties(en-us,office.12).gif Story Returns a Story object that represents the story properties in a text range.
Aa438838.properties(en-us,office.12).gif Text Returns or sets a String that represents the text in a text range or WordArt shape. Read/write.
Aa438838.properties(en-us,office.12).gif WordsCount Returns the number of words in the text range represented by the parent TextRange object. Read-only.


Community Additions

ADD
Show:
© 2014 Microsoft