static void InsertRichTextInTextBox(Document document)
 {
     #region #InsertRichTextInTextBox
     document.LoadDocument("Documents//Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml);
     Shape myTextBox = document.Shapes[0];
     // Allow text box resize to fit contents.
     myTextBox.TextBox.HeightRule = TextBoxSizeRule.Auto;
     SubDocument boxedDocument  = myTextBox.TextBox.Document;
     int         appendPosition = myTextBox.TextBox.Document.Range.End.ToInt();
     // Append the second paragraph of the main document to the boxed text.
     DocumentRange newRange = boxedDocument.AppendDocumentContent(document.Paragraphs[1].Range);
     boxedDocument.Paragraphs.Insert(newRange.Start);
     // Insert an image form the main document into the text box.
     boxedDocument.Images.Insert(boxedDocument.CreatePosition(appendPosition), document.Images[0].Image.NativeImage);
     // Resize the image so that its size equals the image in the main document.
     boxedDocument.Images[0].Size = document.Images[0].Size;
     #endregion #InsertRichTextInTextBox
 }