Range.FormattedText Property 

Returns or sets a Range object that includes the formatted text in the specified range or selection.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Usage

Dim range1 As Range

Dim returnValue As Range
returnValue = range1.FormattedText

Dim sampleValue As Range
range1.FormattedText = sampleValue

Syntax

Property FormattedText() As Range
Range FormattedText {get; set;}
property Range^ FormattedText{
    Range^ get();
    Void set(Range^);
}
public Range get_FormattedText();
public void set_FormattedText(Range);
function get FormattedText() : Range;
function set FormattedText(Range);

Remarks

This property returns a Range object with the character formatting and text from the specified range. Paragraph formatting is included in the Range object if there's a paragraph mark in the range or selection.

When you set this property, the text in the range is replaced with formatted text. If you don't want to replace the existing text, use the Collapse method before using this property.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

Range Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

Range Members