Bookmark.ImportFragment Method

Imports a document fragment into the Bookmark.

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

Syntax

'Declaration
Sub ImportFragment ( _
    FileName As String, _
    MatchDestination As Boolean _
)
void ImportFragment(
    string FileName,
    bool MatchDestination
)

Parameters

  • FileName
    Type: System.String

    Specifies the full path of the document fragment to import.

  • MatchDestination
    Type: System.Boolean

    true to match the destination formatting; otherwise, false. If you specify false, the imported document fragment retains the formatting in the original document. The default is false.

Remarks

This method replaces the contents of the Bookmark. To stop this from occurring, use the Collapse method before using this method.

.NET Framework Security

See Also

Reference

Bookmark Interface

Microsoft.Office.Tools.Word Namespace