Range.ExportFragment method (Word)

Exports the selected range into a document for use as a document fragment.

Syntax

expression. ExportFragment( _FileName_ , _Format_ )

expression An expression that returns a Range object.

Parameters

Name Required/Optional Data type Description
FileName Required String Specifies the path and file name of the file in which to save the document fragment.
Format Required WdSaveFormat Specifies the file format of the document fragment file.

Return value

Nothing

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.