Range.ExportFragment Method
Exports the selected range into a document for use as a document fragment.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Sub ExportFragment ( _
FileName As String, _
Format As WdSaveFormat _
)
'Usage
Dim instance As Range
Dim FileName As String
Dim Format As WdSaveFormat
instance.ExportFragment(FileName, Format)
void ExportFragment(
string FileName,
WdSaveFormat Format
)
Parameters
- FileName
Type: System.String
Required String Specifies the path and file name of the file in which to save the document fragment.
- Format
Type: Microsoft.Office.Interop.Word.WdSaveFormat
Required WdSaveFormat Specifies the file format of the document fragment file. You can save a document fragment in any format that Microsoft Office Word supports.