Insert a document at a position where an arbitrary text is found in another document

In this sample we load an existing DOCX (JsFrameworkExcerpt.docx), find the text "software design principles" (which occurs on page 2 of the document), and insert the body of another short document (SampleParagraphs.docx) before the found text, making sure the insert position is valid.