Range Methods (Word)
Contribute to this content Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation. |
Methods
Name |
Description |
---|---|
Automatically formats a document. Use the Kind property to specify a document type. |
|
Calculates a mathematical expression within a range or selection. Returns the result as a Single. |
|
Begins a spelling and grammar check for the specified range. |
|
Begins a spelling check for the specified document or range. |
|
Displays the Thesaurus dialog box, which lists alternative word choices, or synonyms, for the text in the specified range. |
|
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. |
|
Returns a Long that represents a statistic based on the contents of the specified range. |
|
Converts the specified range from hangul to hanja or vice versa. |
|
Converts text within a range to a table. Returns the table as a Table object. |
|
Copies the specified range to the Clipboard. |
|
The CopyAsPicture method works the same way as the Copy method. |
|
Removes the specified object from the document and places it on the Clipboard. |
|
Deletes the specified number of characters or words. |
|
Analyzes the specified text to determine the language that it is written in. |
|
Moves or extends the ending character position of a range to the end of the nearest specified text unit. |
|
Expands the specified range or selection. Returns the number of characters added to the range or selection. Long. |
|
Saves a portion of a document as PDF or XPS format. |
|
Exports the selected range into a document for use as a document fragment. |
|
Returns a SpellingSuggestions collection that represents the words suggested as spelling replacements for the first word in the specified range. |
|
Returns a Range object that represents the start position of the specified item, such as a page, bookmark, or field. |
|
Returns a Range object that represents an area of a document that can be modified by the specified user or group of users. |
|
Returns a Range object that refers to the start position of the next item or location specified by the What argument. . |
|
Returns a Range object that refers to the start position of the previous item or location specified by the What argument. |
|
Imports a document fragment into the document at the specified range. |
|
Returns True if the range to which the method is applied is contained in the range specified by the Range argument. |
|
Inserts the specified text at the end of a range. |
|
Inserts an absolute tab that is always positioned in the same spot, relative to either the margins or indents. |
|
Attempts to match the text in the specified range or the text surrounding the range with an existing AutoText entry name. |
|
Inserts the specified text before the specified range. |
|
Inserts a page, column, or section break. |
|
Inserts a caption immediately preceding or following the specified range. |
|
Inserts a cross-reference to a heading, bookmark, footnote, or endnote, or to an item for which a caption label is defined (for example, an equation, figure, or table). |
|
Retrieves data from a data source (for example, a separate Microsoft Word document, a Microsoft Excel worksheet, or a Microsoft Access database) and inserts the data as a table in place of the specified range. |
|
Inserts the current date or time, or both, either as text or as a TIME field. |
|
Inserts all or part of the specified file. |
|
Replaces the specified range with a new paragraph. |
|
Inserts a paragraph mark after a range. |
|
Inserts a new paragraph before the specified range. |
|
Inserts a symbol in place of the specified range. |
|
Inserts the specified XML into the document at the specified range, replacing any text contained within the range. |
|
True if the range to which this method is applied is in the same story as the range specified by the Range argument. |
|
True if the range to which this method is applied is equal to the range specified by the Range argument. |
|
Looks up a name in the global address book list and displays the Properties dialog box, which includes information about the specified name. |
|
Adds, modifies, or removes an enclosure around the specified character or characters. |
|
Collapses the specified range to its start or end position and then moves the collapsed object by the specified number of units. |
|
Moves the ending character position of a range. . |
|
Moves the end position of the specified range until any of the specified characters are found in the document. If the movement is forward in the document, the range is expanded. |
|
Moves the ending character position of a range while any of the specified characters are found in the document. |
|
Moves the start position of the specified range. |
|
Moves the start position of the specified range until one of the specified characters is found in the document. |
|
Moves the start position of the specified range while any of the specified characters are found in the document. |
|
Moves the specified range until one of the specified characters is found in the document. |
|
Moves the specified range while any of the specified characters are found in the document. |
|
Returns a Range object that represents the specified unit relative to the specified range. |
|
Moves the range to the next subdocument. |
|
Inserts the contents of the Clipboard at the specified range. |
|
Pastes the selected table cells and formats them as specified. |
|
Merges pasted cells into an existing table by inserting the pasted rows between the selected rows. No cells are overwritten. |
|
Pastes a cell or group of cells as a nested table into the selected range. |
|
Pastes and formats a Microsoft Excel table. |
|
Inserts the contents of the Clipboard. . |
|
Adds phonetic guides to the specified range. |
|
Returns the previous range a relative to the specified range. |
|
Moves the range to the previous subdocument. |
|
In outline view, moves the paragraphs within the specified range after the next visible paragraph or before the previous visible paragraph. |
|
Selects the specified range. |
|
Sets the list level for one or more items in a numbered list. |
|
Sets the starting and ending character positions for an existing range. |
|
Sorts the paragraphs in the specified range. |
|
Sorts paragraphs or table rows in ascending alphanumeric order. |
|
Sorts the headings in the specified range. |
|
Sorts paragraphs in descending alphanumeric order. |
|
Moves or extends the start position of the specified range or selection to the beginning of the nearest specified text unit. This method returns a Long that indicates the number of characters by which the range or selection was moved or extended. The method returns a negative number if the movement is backward through the document. |
|
Converts the specified range from Traditional Chinese to Simplified Chinese or vice versa. |
|
Expands a range to include the entire story. |