Subdocuments.AddFromRange Method

Creates one or more subdocuments from the text in the specified range and returns a Subdocument object.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function AddFromRange ( _
    Range As Range _
) As Subdocument
'Usage
Dim instance As Subdocuments
Dim Range As Range
Dim returnValue As Subdocument

returnValue = instance.AddFromRange(Range)
Subdocument AddFromRange(
    Range Range
)

Parameters

Return Value

Type: Microsoft.Office.Interop.Word.Subdocument

Remarks

Note The range must begin with one of the built-in heading level styles (for example, Heading 1). Subdocuments are created at each paragraph formatted with the same heading format used at the beginning of the range. Subdocument files are saved when the master document is saved and are automatically named using text from the first line in the file.

See Also

Reference

Subdocuments Interface

Subdocuments Members

Microsoft.Office.Interop.Word Namespace