Freigeben über


Range Object Members

Word Developer Reference

Represents a contiguous area in a document. Each Range object is defined by a starting and ending character position.

Methods

  Name Description
Bb257694.methods(en-us,office.12).gif AutoFormat Automatically formats a document. Use the Kind property to specify a document type.
Bb257694.methods(en-us,office.12).gif Calculate Calculates a mathematical expression within a range or selection. Returns the result as a Single.
Bb257694.methods(en-us,office.12).gif CheckGrammar Begins a spelling and grammar check for the specified range.
Bb257694.methods(en-us,office.12).gif CheckSpelling Begins a spelling check for the specified document or range.
Bb257694.methods(en-us,office.12).gif CheckSynonyms Displays the Thesaurus dialog box, which lists alternative word choices, or synonyms, for the text in the specified range.
Bb257694.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.
Bb257694.methods(en-us,office.12).gif ComputeStatistics Returns a Long that represents a statistic based on the contents of the specified range.
Bb257694.methods(en-us,office.12).gif ConvertHangulAndHanja Converts the specified range from hangul to hanja or vice versa.
Bb257694.methods(en-us,office.12).gif ConvertToTable Converts text within a range to a table. Returns the table as a Table object.
Bb257694.methods(en-us,office.12).gif Copy Copies the specified range to the Clipboard.
Bb257694.methods(en-us,office.12).gif CopyAsPicture The CopyAsPicture method works the same way as the Copy method.
Bb257694.methods(en-us,office.12).gif CreatePublisher You have requested Help for a Visual Basic keyword used only on the Macintosh. For information about the CreatePublisher method of the Range object, consult the language reference Help included with Microsoft Office Macintosh Edition.
Bb257694.methods(en-us,office.12).gif Cut Removes the specified object from the document and places it on the Clipboard.
Bb257694.methods(en-us,office.12).gif Delete Deletes the specified number of characters or words.
Bb257694.methods(en-us,office.12).gif DetectLanguage Analyzes the specified text to determine the language that it is written in.
Bb257694.methods(en-us,office.12).gif EndOf Moves or extends the ending character position of a range to the end of the nearest specified text unit.
Bb257694.methods(en-us,office.12).gif Expand Expands the specified range or selection. Returns the number of characters added to the range or selection. Long.
Bb257694.methods(en-us,office.12).gif ExportAsFixedFormat Saves a portion of a document as PDF or XPS format.
Bb257694.methods(en-us,office.12).gif ExportFragment Exports the selected range into a document for use as a document fragment.
Bb257694.methods(en-us,office.12).gif GetSpellingSuggestions Returns a SpellingSuggestions collection that represents the words suggested as spelling replacements for the first word in the specified range.
Bb257694.methods(en-us,office.12).gif GoTo Returns a Range object that represents the start position of the specified item, such as a page, bookmark, or field.
Bb257694.methods(en-us,office.12).gif GoToEditableRange Returns a Range object that represents an area of a document that can be modified by the specified user or group of users.
Bb257694.methods(en-us,office.12).gif GoToNext Returns a Range object that refers to the start position of the next item or location specified by the What argument.
Bb257694.methods(en-us,office.12).gif GoToPrevious Returns a Range object that refers to the start position of the previous item or location specified by the What argument.
Bb257694.methods(en-us,office.12).gif ImportFragment Imports a document fragment into the document at the specified range.
Bb257694.methods(en-us,office.12).gif InRange Returns True if the range to which the method is applied is contained in the range specified by the Range argument.
Bb257694.methods(en-us,office.12).gif InsertAfter Inserts the specified text at the end of a range.
Bb257694.methods(en-us,office.12).gif InsertAlignmentTab Inserts an absolute tab that is always positioned in the same spot, relative to either the margins or indents.
Bb257694.methods(en-us,office.12).gif InsertAutoText Attempts to match the text in the specified range or the text surrounding the range with an existing AutoText entry name.
Bb257694.methods(en-us,office.12).gif InsertBefore Inserts the specified text before the specified range.
Bb257694.methods(en-us,office.12).gif InsertBreak Inserts a page, column, or section break.
Bb257694.methods(en-us,office.12).gif InsertCaption Inserts a caption immediately preceding or following the specified range.
Bb257694.methods(en-us,office.12).gif InsertCrossReference 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).
Bb257694.methods(en-us,office.12).gif InsertDatabase Retrieves data from a data source (for example, a separate Microsoft Office Word document, a Microsoft Office Excel worksheet, or a Microsoft Office Access database) and inserts the data as a table in place of the specified range.
Bb257694.methods(en-us,office.12).gif InsertDateTime Inserts the current date or time, or both, either as text or as a TIME field.
Bb257694.methods(en-us,office.12).gif InsertFile Inserts all or part of the specified file.
Bb257694.methods(en-us,office.12).gif InsertParagraph Replaces the specified range with a new paragraph.
Bb257694.methods(en-us,office.12).gif InsertParagraphAfter Inserts a paragraph mark after a range.
Bb257694.methods(en-us,office.12).gif InsertParagraphBefore Inserts a new paragraph before the specified range.
Bb257694.methods(en-us,office.12).gif InsertSymbol Inserts a symbol in place of the specified range.
Bb257694.methods(en-us,office.12).gif InsertXML Inserts the specified XML into the document at the specified range, replacing any text contained within the range.
Bb257694.methods(en-us,office.12).gif InStory True if the range to which this method is applied is in the same story as the range specified by the Range argument.
Bb257694.methods(en-us,office.12).gif IsEqual True if the range to which this method is applied is equal to the range specified by the Range argument.
Bb257694.methods(en-us,office.12).gif LookupNameProperties Looks up a name in the global address book list and displays the Properties dialog box, which includes information about the specified name.
Bb257694.methods(en-us,office.12).gif ModifyEnclosure Adds, modifies, or removes an enclosure around the specified character or characters.
Bb257694.methods(en-us,office.12).gif Move Collapses the specified range to its start or end position and then moves the collapsed object by the specified number of units.
Bb257694.methods(en-us,office.12).gif MoveEnd Moves the ending character position of a range.
Bb257694.methods(en-us,office.12).gif MoveEndUntil 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.
Bb257694.methods(en-us,office.12).gif MoveEndWhile Moves the ending character position of a range while any of the specified characters are found in the document.
Bb257694.methods(en-us,office.12).gif MoveStart Moves the start position of the specified range.
Bb257694.methods(en-us,office.12).gif MoveStartUntil Moves the start position of the specified range until one of the specified characters is found in the document.
Bb257694.methods(en-us,office.12).gif MoveStartWhile Moves the start position of the specified range while any of the specified characters are found in the document.
Bb257694.methods(en-us,office.12).gif MoveUntil Moves the specified range until one of the specified characters is found in the document.
Bb257694.methods(en-us,office.12).gif MoveWhile Moves the specified range while any of the specified characters are found in the document.
Bb257694.methods(en-us,office.12).gif Next Returns a Range object that represents the specified unit relative to the specified range.
Bb257694.methods(en-us,office.12).gif NextSubdocument Moves the range to the next subdocument.
Bb257694.methods(en-us,office.12).gif Paste Inserts the contents of the Clipboard at the specified range.
Bb257694.methods(en-us,office.12).gif PasteAndFormat Pastes the selected table cells and formats them as specified.
Bb257694.methods(en-us,office.12).gif PasteAppendTable Merges pasted cells into an existing table by inserting the pasted rows between the selected rows. No cells are overwritten.
Bb257694.methods(en-us,office.12).gif PasteAsNestedTable Pastes a cell or group of cells as a nested table into the selected range.
Bb257694.methods(en-us,office.12).gif PasteExcelTable Pastes and formats a Microsoft Excel table.
Bb257694.methods(en-us,office.12).gif PasteSpecial Inserts the contents of the Clipboard.
Bb257694.methods(en-us,office.12).gif PhoneticGuide Adds phonetic guides to the specified range.
Bb257694.methods(en-us,office.12).gif Previous Returns the previous range a relative to the specified range.
Bb257694.methods(en-us,office.12).gif PreviousSubdocument Moves the range to the previous subdocument.
Bb257694.methods(en-us,office.12).gif Relocate In outline view, moves the paragraphs within the specified range after the next visible paragraph or before the previous visible paragraph.
Bb257694.methods(en-us,office.12).gif Select Selects the specified range.
Bb257694.methods(en-us,office.12).gif SetListLevel Sets the list level for one or more items in a numbered list.
Bb257694.methods(en-us,office.12).gif SetRange Sets the starting and ending character positions for an existing range.
Bb257694.methods(en-us,office.12).gif Sort Sorts the paragraphs in the specified range.
Bb257694.methods(en-us,office.12).gif SortAscending Sorts paragraphs or table rows in ascending alphanumeric order.
Bb257694.methods(en-us,office.12).gif SortDescending Sorts paragraphs in descending alphanumeric order.
Bb257694.methods(en-us,office.12).gif StartOf 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.
Bb257694.methods(en-us,office.12).gif SubscribeTo You have requested Help for a Visual Basic keyword used only on the Macintosh. For information about the SubscribeTo method of the Range object, consult the language reference Help included with Microsoft Office Macintosh Edition.
Bb257694.methods(en-us,office.12).gif TCSCConverter Converts the specified range from Traditional Chinese to Simplified Chinese or vice versa.
Bb257694.methods(en-us,office.12).gif WholeStory Expands a range to include the entire story.

Properties

  Name Description
Bb257694.properties(en-us,office.12).gif Application Returns an Application object that represents the Microsoft Word application.
Bb257694.properties(en-us,office.12).gif Bold True if the range is formatted as bold. Read/write Long.
Bb257694.properties(en-us,office.12).gif BoldBi True if the font or range is formatted as bold. Returns True, False, or wdUndefined (for a mixture of bold and non-bold text). Can be set to True, False, or wdToggle. Read/write Long.
Bb257694.properties(en-us,office.12).gif BookmarkID Returns the number of the bookmark that encloses the beginning of the specified range; returns 0 (zero) if there is no corresponding bookmark. Read-only Long.
Bb257694.properties(en-us,office.12).gif Bookmarks Returns a Bookmarks collection that represents all the bookmarks in a document, range, or selection. Read-only.
Bb257694.properties(en-us,office.12).gif Borders Returns a Borders collection that represents all the borders for the specified object.
Bb257694.properties(en-us,office.12).gif Case Returns or sets a WdCharacterCase constant that represents the case of the text in the specified range. Read/write.
Bb257694.properties(en-us,office.12).gif Cells Returns a Cells collection that represents the table cells in a range. Read-only.
Bb257694.properties(en-us,office.12).gif Characters Returns a Characters collection that represents the characters in a range. Read-only.
Bb257694.properties(en-us,office.12).gif CharacterStyle Returns a Variant that represents the style used to format one or more characters. Read-only.
Bb257694.properties(en-us,office.12).gif CharacterWidth Returns or sets the character width of the specified range. Read/write WdCharacterWidth.
Bb257694.properties(en-us,office.12).gif Columns Returns a Columns collection that represents all the table columns in the range. Read-only.
Bb257694.properties(en-us,office.12).gif CombineCharacters True if the specified range contains combined characters. Read/write Boolean.
Bb257694.properties(en-us,office.12).gif Comments Returns a Comments collection that represents all the comments in the specified document, selection, or range. Read-only.
Bb257694.properties(en-us,office.12).gif ContentControls Returns a ContentControls collection that represents the content controls contained within a range. Read-only.
Bb257694.properties(en-us,office.12).gif Creator Returns a 32-bit integer that indicates the application in which the specified object was created. Read-only Long.
Bb257694.properties(en-us,office.12).gif DisableCharacterSpaceGrid True if Microsoft Word ignores the number of characters per line for the corresponding Range object. Read/write Boolean.
Bb257694.properties(en-us,office.12).gif Document Returns a Document object associated with the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif Duplicate Returns a read-only Range object that represents all the properties of the specified range.
Bb257694.properties(en-us,office.12).gif Editors Returns an Editors object that represents all the users authorized to modify a selection or range within a document.
Bb257694.properties(en-us,office.12).gif EmphasisMark Returns or sets the emphasis mark for a character or designated character string. Read/write WdEmphasisMark.
Bb257694.properties(en-us,office.12).gif End Returns or sets the ending character position of a range. Read/write Long.
Bb257694.properties(en-us,office.12).gif EndnoteOptions Returns an EndnoteOptions object that represents the endnotes in a range.
Bb257694.properties(en-us,office.12).gif Endnotes Returns an Endnotes collection that represents all the endnotes in a range. Read-only.
Bb257694.properties(en-us,office.12).gif EnhMetaFileBits Returns a Variant that represents a picture representation of how a range of text appears.
Bb257694.properties(en-us,office.12).gif Fields Returns a Fields collection that represents all the fields in the range. Read-only.
Bb257694.properties(en-us,office.12).gif Find Returns a Find object that contains the criteria for a find operation. Read-only.
Bb257694.properties(en-us,office.12).gif FitTextWidth Returns or sets the width (in the current measurement units) in which Microsoft Word fits the text in the current selection or range. Read/write Single.
Bb257694.properties(en-us,office.12).gif Font Returns or sets a Font object that represents the character formatting of the specified object. Read/write Font.
Bb257694.properties(en-us,office.12).gif FootnoteOptions Returns FootnoteOptions object that represents the footnotes in a selection or range.
Bb257694.properties(en-us,office.12).gif Footnotes Returns a Footnotes collection that represents all the footnotes in a range. Read-only.
Bb257694.properties(en-us,office.12).gif FormattedText Returns or sets a Range object that includes the formatted text in the specified range or selection. Read/write.
Bb257694.properties(en-us,office.12).gif FormFields Returns a FormFields collection that represents all the form fields in the range. Read-only.
Bb257694.properties(en-us,office.12).gif Frames Returns a Frames collection that represents all the frames in a range. Read-only.
Bb257694.properties(en-us,office.12).gif GrammarChecked True if a grammar check has been run on the specified range or document. Read/write Boolean.
Bb257694.properties(en-us,office.12).gif GrammaticalErrors Returns a ProofreadingErrors collection that represents the sentences that failed the grammar check on the specified document or range. Read-only.
Bb257694.properties(en-us,office.12).gif HighlightColorIndex Returns or sets the highlight color for the specified range. Read/write WdColorIndex.
Bb257694.properties(en-us,office.12).gif HorizontalInVertical Returns or sets the formatting for horizontal text set within vertical text. Read/write WdHorizontalInVerticalType.
Bb257694.properties(en-us,office.12).gif HTMLDivisions Returns an HTMLDivisions object that represents an HTML division in a Web document.
Bb257694.properties(en-us,office.12).gif Hyperlinks Returns a Hyperlinks collection that represents all the hyperlinks in the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif ID Returns or sets the identification name for the specified range. Read/write String.
Bb257694.properties(en-us,office.12).gif Information Returns information about the specified range. Read-only Variant.
Bb257694.properties(en-us,office.12).gif InlineShapes Returns an InlineShapes collection that represents all the InlineShape objects in a range. Read-only.
Bb257694.properties(en-us,office.12).gif IsEndOfRowMark True if the specified range is collapsed and is located at the end-of-row mark in a table. Read-only Boolean.
Bb257694.properties(en-us,office.12).gif Italic True if the font or range is formatted as italic. Read/write Long.
Bb257694.properties(en-us,office.12).gif ItalicBi True if the font or range is formatted as italic. Read/write Long.
Bb257694.properties(en-us,office.12).gif Kana Returns or sets whether the specified range of Japanese language text is hiragana or katakana. Read/write WdKana.
Bb257694.properties(en-us,office.12).gif LanguageDetected Returns or sets a value that specifies whether Microsoft Word has detected the language of the specified text. Read/write Boolean.
Bb257694.properties(en-us,office.12).gif LanguageID Returns or sets a WdLanguageID constant that represents the language for the specified range. Read/write.
Bb257694.properties(en-us,office.12).gif LanguageIDFarEast Returns or sets an East Asian language for the specified object. Read/write WdLanguageID.
Bb257694.properties(en-us,office.12).gif LanguageIDOther Returns or sets the language for the specified range. Read/write WdLanguageID.
Bb257694.properties(en-us,office.12).gif ListFormat Returns a ListFormat object that represents all the list formatting characteristics of a range. Read-only.
Bb257694.properties(en-us,office.12).gif ListParagraphs Returns a ListParagraphs collection that represents all the numbered paragraphs in the range. Read-only.
Bb257694.properties(en-us,office.12).gif ListStyle Returns a Variant that represents the style used to format a bulleted list or numbered list. Read-only.
Bb257694.properties(en-us,office.12).gif NextStoryRange Returns a Range object that refers to the next story. Read-only Range.
Bb257694.properties(en-us,office.12).gif NoProofing True if the spelling and grammar checker ignores the specified text. Read/write Long.
Bb257694.properties(en-us,office.12).gif OMaths Returns an OMaths collection that represents the OMath objects within the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif Orientation Returns or sets the orientation of text in a range when the Text Direction feature is enabled. Read/write WdTextOrientation.
Bb257694.properties(en-us,office.12).gif PageSetup Returns a PageSetup object that's associated with the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif ParagraphFormat Returns or sets a ParagraphFormat object that represents the paragraph settings for the specified range. Read/write.
Bb257694.properties(en-us,office.12).gif Paragraphs Returns a Paragraphs collection that represents all the paragraphs in the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif ParagraphStyle Returns a Variant that represents the style used to format a paragraph. Read-only.
Bb257694.properties(en-us,office.12).gif Parent Returns an Object that represents the parent object of the specified Range object.
Bb257694.properties(en-us,office.12).gif ParentContentControl Returns a ContentControl object that represents the parent content control for the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif PreviousBookmarkID Returns the number of the last bookmark that starts before or at the same place as the specified range. Read-only Long.
Bb257694.properties(en-us,office.12).gif ReadabilityStatistics Returns a ReadabilityStatistics collection that represents the readability statistics for the specified document or range. Read-only.
Bb257694.properties(en-us,office.12).gif Revisions Returns a Revisions collection that represents the tracked changes in the range. Read-only.
Bb257694.properties(en-us,office.12).gif Rows Returns a Rows collection that represents all the table rows in a range. Read-only.
Bb257694.properties(en-us,office.12).gif Scripts Returns a Scripts collection that represents the collection of HTML scripts in the specified object.
Bb257694.properties(en-us,office.12).gif Sections Returns a Sections collection that represents the sections in the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif Sentences Returns a Sentences collection that represents all the sentences in the range. Read-only.
Bb257694.properties(en-us,office.12).gif Shading Returns a Shading object that refers to the shading formatting for the specified object.
Bb257694.properties(en-us,office.12).gif ShapeRange Returns a ShapeRange collection that represents all the Shape objects in the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif ShowAll True if all nonprinting characters (such as hidden text, tab marks, space marks, and paragraph marks) are displayed. Read/write Boolean.
Bb257694.properties(en-us,office.12).gif SmartTags Returns a SmartTags object that represents a smart tag in a document.
Bb257694.properties(en-us,office.12).gif SpellingChecked True if spelling has been checked throughout the specified range or document. False if all or some of the range or document has not been checked for spelling. Read/write Boolean.
Bb257694.properties(en-us,office.12).gif SpellingErrors Returns a ProofreadingErrors collection that represents the words identified as spelling errors in the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif Start Returns or sets the starting character position of a range. Read/write Long.
Bb257694.properties(en-us,office.12).gif StoryLength Returns the number of characters in the story that contains the specified range. Read-only Long.
Bb257694.properties(en-us,office.12).gif StoryType Returns the story type for the specified range, selection, or bookmark. Read-only WdStoryType.
Bb257694.properties(en-us,office.12).gif Style Returns or sets the style for the specified object. Read/write Variant.
Bb257694.properties(en-us,office.12).gif Subdocuments Returns a Subdocuments collection that represents all the subdocuments in the specified range or document. Read-only.
Bb257694.properties(en-us,office.12).gif SynonymInfo Returns a SynonymInfo object that contains information from the thesaurus on synonyms, antonyms, or related words and expressions for the contents of a range.
Bb257694.properties(en-us,office.12).gif Tables Returns a Tables collection that represents all the tables in the specified range. Read-only.
Bb257694.properties(en-us,office.12).gif TableStyle Returns a Variant that represents the style used to format a table. Read-only.
Bb257694.properties(en-us,office.12).gif Text Returns or sets the text in the specified range or selection. Read/write String. Read/write String.
Bb257694.properties(en-us,office.12).gif TextRetrievalMode Returns a TextRetrievalMode object that controls how text is retrieved from the specified Range. Read/write.
Bb257694.properties(en-us,office.12).gif TopLevelTables Returns a Tables collection that represents the tables at the outermost nesting level in the current range. Read-only.
Bb257694.properties(en-us,office.12).gif TwoLinesInOne Returns or sets whether Microsoft Word sets two lines of text in one and specifies the characters that enclose the text, if any. Read/write WdTwoLinesInOneType.
Bb257694.properties(en-us,office.12).gif Underline Returns or sets the type of underline applied to a range. Read/write WdUnderline.
Bb257694.properties(en-us,office.12).gif WordOpenXML Returns a String that represents the XML contained within the range in the Microsoft Office Word Open XML format. Read-only.
Bb257694.properties(en-us,office.12).gif Words Returns a Words collection that represents all the words in a range. Read-only.
Bb257694.properties(en-us,office.12).gif XML Returns a String that represents the XML text in the specified object.
Bb257694.properties(en-us,office.12).gif XMLNodes Returns an XMLNodes collection that represents the XML elements in the specified range—including any elements that are only partially within the range. Read-only.
Bb257694.properties(en-us,office.12).gif XMLParentNode Returns an XMLNode object that represents the parent XML node of a range. Read-only.