Table of Contents

Method FromDocument

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

FromDocument(WordDocument, bool)

Makes a fragment of a whole document, taking ownership of it.

public static DocumentFragment FromDocument(WordDocument document, bool endsWithParagraphMark = true)

Parameters

document WordDocument

The document; the fragment disposes it.

endsWithParagraphMark bool

Whether the last paragraph's mark is part of the content (true for whole paragraphs; false for content to go into a paragraph, as a single line of pasted text does).

Returns

DocumentFragment

The fragment.

Exceptions

ArgumentNullException

document is null.