Bookmark.ImportFragment Method (String, Boolean)


Imports a document fragment into the Bookmark.

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

void ImportFragment(
	string FileName,
	bool MatchDestination = false


Type: System.String

Specifies the full path of the document fragment to import.

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.

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

Return to top