Method FromDocument
FromDocument(WordDocument, bool)
Makes a fragment of a whole document, taking ownership of it.
public static DocumentFragment FromDocument(WordDocument document, bool endsWithParagraphMark = true)
Parameters
documentWordDocumentThe document; the fragment disposes it.
endsWithParagraphMarkboolWhether 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
documentis null.