コード例 #1
0
        public void CompareTest()
        {
            Application word      = new Application();
            Document    document1 = word.Documents.Open(@"G:\abi\word_module\Word_Table\test1.docx");
            Document    document2 = word.Documents.Open(@"G:\abi\word_module\Word_Table\test2.docx");

            word.Visible = true;

            Range range1 = document1.Range();
            Range range2 = document2.Range();

            Endnotes endnotes1 = range1.Endnotes;
            Endnotes endnotes2 = range2.Endnotes;


            ABIW_Endnotes aBIW_Endnotes1 = new ABIW_Endnotes(endnotes1);
            ABIW_Endnotes aBIW_Endnotes2 = new ABIW_Endnotes(endnotes2);

            string result = aBIW_Endnotes1.Compare(aBIW_Endnotes2).Result.ToString();

            document1.Close();
            document2.Close();
            word.Quit();
        }
コード例 #2
0
        // Generates content of endnotesPart1.
        private void GenerateEndnotesPart1Content(EndnotesPart endnotesPart1)
        {
            Endnotes endnotes1 = new Endnotes(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15 wp14" }  };
            endnotes1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            endnotes1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            endnotes1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            endnotes1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            endnotes1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            endnotes1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            endnotes1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            endnotes1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            endnotes1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            endnotes1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2010/11/wordml");
            endnotes1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            endnotes1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            endnotes1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            endnotes1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Endnote endnote1 = new Endnote(){ Type = FootnoteEndnoteValues.Separator, Id = -1 };

            Paragraph paragraph23 = new Paragraph(){ RsidParagraphAddition = "00DC649D", RsidParagraphProperties = "00E930A2", RsidRunAdditionDefault = "00DC649D" };

            Run run29 = new Run();
            SeparatorMark separatorMark1 = new SeparatorMark();

            run29.Append(separatorMark1);

            paragraph23.Append(run29);

            endnote1.Append(paragraph23);

            Endnote endnote2 = new Endnote(){ Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0 };

            Paragraph paragraph24 = new Paragraph(){ RsidParagraphAddition = "00DC649D", RsidParagraphProperties = "00E930A2", RsidRunAdditionDefault = "00DC649D" };

            Run run30 = new Run();
            ContinuationSeparatorMark continuationSeparatorMark1 = new ContinuationSeparatorMark();

            run30.Append(continuationSeparatorMark1);

            paragraph24.Append(run30);

            endnote2.Append(paragraph24);

            endnotes1.Append(endnote1);
            endnotes1.Append(endnote2);

            endnotesPart1.Endnotes = endnotes1;
        }
コード例 #3
0
        public static void GenerateEndnotesPart1Content(EndnotesPart endnotesPart1)
        {
            var endnotes1 = new Endnotes
            {
                MCAttributes = new MarkupCompatibilityAttributes {
                    Ignorable = "w14 w15 w16se w16cid wp14"
                }
            };

            endnotes1.AddNamespaceDeclaration("wpc",
                                              "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            endnotes1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
            endnotes1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
            endnotes1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
            endnotes1.AddNamespaceDeclaration("cx3", "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex");
            endnotes1.AddNamespaceDeclaration("cx4", "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex");
            endnotes1.AddNamespaceDeclaration("cx5", "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex");
            endnotes1.AddNamespaceDeclaration("cx6", "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex");
            endnotes1.AddNamespaceDeclaration("cx7", "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex");
            endnotes1.AddNamespaceDeclaration("cx8", "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex");
            endnotes1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            endnotes1.AddNamespaceDeclaration("aink", "http://schemas.microsoft.com/office/drawing/2016/ink");
            endnotes1.AddNamespaceDeclaration("am3d", "http://schemas.microsoft.com/office/drawing/2017/model3d");
            endnotes1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            endnotes1.AddNamespaceDeclaration("r",
                                              "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            endnotes1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            endnotes1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            endnotes1.AddNamespaceDeclaration("wp14",
                                              "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("wp",
                                              "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            endnotes1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            endnotes1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            endnotes1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            endnotes1.AddNamespaceDeclaration("w16cid", "http://schemas.microsoft.com/office/word/2016/wordml/cid");
            endnotes1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
            endnotes1.AddNamespaceDeclaration("wpg",
                                              "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            endnotes1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            endnotes1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            endnotes1.AddNamespaceDeclaration("wps",
                                              "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            var endnote1 = new Endnote {
                Type = FootnoteEndnoteValues.Separator, Id = -1
            };

            var paragraph271 = new Paragraph
            {
                RsidParagraphAddition  = "003C529E",
                RsidRunAdditionDefault = "003C529E",
                ParagraphId            = "45330DB0",
                TextId = "77777777"
            };

            var paragraphProperties174 = new ParagraphProperties();
            var spacingBetweenLines171 =
                new SpacingBetweenLines {
                After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };

            paragraphProperties174.Append(spacingBetweenLines171);

            var run394         = new Run();
            var separatorMark1 = new SeparatorMark();

            run394.Append(separatorMark1);

            paragraph271.Append(paragraphProperties174);
            paragraph271.Append(run394);

            endnote1.Append(paragraph271);

            var endnote2 = new Endnote {
                Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0
            };

            var paragraph272 = new Paragraph
            {
                RsidParagraphAddition  = "003C529E",
                RsidRunAdditionDefault = "003C529E",
                ParagraphId            = "02CE0DA3",
                TextId = "77777777"
            };

            var paragraphProperties175 = new ParagraphProperties();
            var spacingBetweenLines172 =
                new SpacingBetweenLines {
                After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };

            paragraphProperties175.Append(spacingBetweenLines172);

            var run395 = new Run();
            var continuationSeparatorMark1 = new ContinuationSeparatorMark();

            run395.Append(continuationSeparatorMark1);

            paragraph272.Append(paragraphProperties175);
            paragraph272.Append(run395);

            endnote2.Append(paragraph272);

            endnotes1.Append(endnote1);
            endnotes1.Append(endnote2);

            endnotesPart1.Endnotes = endnotes1;
        }
コード例 #4
0
        private static int AddOtherParts(Stream stream, int count)
        {
            const int firstId = 0;

            using WordprocessingDocument wordDocument = WordprocessingDocument.Open(stream, true);
            wordDocument.AddParagraphIdFeature();

            MainDocumentPart mainDocumentPart = wordDocument.MainDocumentPart !;

            // Add Header.
            var headerParagraph = new Paragraph(new Run(new Text("Header")));

            var headerPart = mainDocumentPart.AddNewPart <HeaderPart>();

            headerPart.Header = new Header(headerParagraph);

            // Add Footer.
            var footerParagraph = new Paragraph(new Run(new Text("Footer")));

            var footerPart = mainDocumentPart.AddNewPart <FooterPart>();

            footerPart.Footer = new Footer(footerParagraph);

            // Add Comments.
            var comments = new Comments();

            for (var id = firstId; id < firstId + count; id++)
            {
                var paragraph = new Paragraph(new Run(new Text($"Comment #{id}")));

                comments.AppendChild(new Comment(paragraph)
                {
                    Id     = id.ToString(),
                    Author = $"Author #{id}",
                });
            }

            var commentsPart = mainDocumentPart.AddNewPart <WordprocessingCommentsPart>();

            commentsPart.Comments = comments;

            // Add Footnotes
            var footnotes = new Footnotes();

            for (var id = firstId; id < firstId + count; id++)
            {
                var paragraph = new Paragraph(new Run(new Text($"Footnote #{id}")));

                footnotes.AppendChild(new Footnote(paragraph)
                {
                    Id = id
                });
            }

            var footnotesPart = mainDocumentPart.AddNewPart <FootnotesPart>();

            footnotesPart.Footnotes = footnotes;

            // Add Endnotes.
            var endnotes = new Endnotes();

            for (var id = firstId; id < firstId + count; id++)
            {
                var paragraph = new Paragraph(new Run(new Text($"Endnote #{id}")));

                endnotes.AppendChild(new Endnote(paragraph)
                {
                    Id = id
                });
            }

            var endnotesPart = mainDocumentPart.AddNewPart <EndnotesPart>();

            endnotesPart.Endnotes = endnotes;

            return((3 * count) + 2);
        }
コード例 #5
0
        // Generates content of endnotesPart1.
        private void GenerateEndnotesPart1Content(EndnotesPart endnotesPart1)
        {
            Endnotes endnotes1 = new Endnotes() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
            endnotes1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            endnotes1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            endnotes1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            endnotes1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            endnotes1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            endnotes1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            endnotes1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            endnotes1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            endnotes1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            endnotes1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            endnotes1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            endnotes1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            endnotes1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Endnote endnote1 = new Endnote() { Type = FootnoteEndnoteValues.Separator, Id = -1 };

            Paragraph paragraph55 = new Paragraph() { RsidParagraphAddition = "00571FC0", RsidRunAdditionDefault = "00571FC0" };

            ParagraphProperties paragraphProperties53 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines43 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            paragraphProperties53.Append(spacingBetweenLines43);

            Run run59 = new Run();
            SeparatorMark separatorMark1 = new SeparatorMark();

            run59.Append(separatorMark1);

            paragraph55.Append(paragraphProperties53);
            paragraph55.Append(run59);

            endnote1.Append(paragraph55);

            Endnote endnote2 = new Endnote() { Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0 };

            Paragraph paragraph56 = new Paragraph() { RsidParagraphAddition = "00571FC0", RsidRunAdditionDefault = "00571FC0" };

            ParagraphProperties paragraphProperties54 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines44 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

            paragraphProperties54.Append(spacingBetweenLines44);

            Run run60 = new Run();
            ContinuationSeparatorMark continuationSeparatorMark1 = new ContinuationSeparatorMark();

            run60.Append(continuationSeparatorMark1);

            paragraph56.Append(paragraphProperties54);
            paragraph56.Append(run60);

            endnote2.Append(paragraph56);

            endnotes1.Append(endnote1);
            endnotes1.Append(endnote2);

            endnotesPart1.Endnotes = endnotes1;
        }
コード例 #6
0
 public ABIW_Endnotes(Endnotes endnotes)
 {
     this.Endnotes       = endnotes;
     this.RangeParent    = endnotes.Parent;
     this.EndnoteOptions = RangeParent.EndnoteOptions;
 }
コード例 #7
0
ファイル: Program.cs プロジェクト: RoryNorman/PowerShell
        // Generates content of endnotesPart1.
        private void GenerateEndnotesPart1Content(EndnotesPart endnotesPart1)
        {
            Endnotes endnotes1 = new Endnotes() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se wp14" } };
            endnotes1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            endnotes1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
            endnotes1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
            endnotes1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
            endnotes1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            endnotes1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            endnotes1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            endnotes1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            endnotes1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            endnotes1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            endnotes1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            endnotes1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            endnotes1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            endnotes1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
            endnotes1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            endnotes1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            endnotes1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            endnotes1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Endnote endnote1 = new Endnote() { Type = FootnoteEndnoteValues.Separator, Id = -1 };

            Paragraph paragraph372 = new Paragraph() { RsidParagraphAddition = "00A563A2", RsidRunAdditionDefault = "00A563A2", ParagraphId = "0971F879", TextId = "77777777" };

            Run run761 = new Run();
            SeparatorMark separatorMark1 = new SeparatorMark();

            run761.Append(separatorMark1);

            paragraph372.Append(run761);

            endnote1.Append(paragraph372);

            Endnote endnote2 = new Endnote() { Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0 };

            Paragraph paragraph373 = new Paragraph() { RsidParagraphAddition = "00A563A2", RsidRunAdditionDefault = "00A563A2", ParagraphId = "20D89D9C", TextId = "77777777" };

            Run run762 = new Run();
            ContinuationSeparatorMark continuationSeparatorMark1 = new ContinuationSeparatorMark();

            run762.Append(continuationSeparatorMark1);

            paragraph373.Append(run762);

            endnote2.Append(paragraph373);

            Endnote endnote3 = new Endnote() { Type = FootnoteEndnoteValues.ContinuationNotice, Id = 1 };
            Paragraph paragraph374 = new Paragraph() { RsidParagraphAddition = "00A563A2", RsidRunAdditionDefault = "00A563A2", ParagraphId = "2C52BEC5", TextId = "77777777" };

            endnote3.Append(paragraph374);

            endnotes1.Append(endnote1);
            endnotes1.Append(endnote2);
            endnotes1.Append(endnote3);

            endnotesPart1.Endnotes = endnotes1;
        }
コード例 #8
0
        // Generates content of endnotesPart1.
        private void GenerateEndnotesPart1Content(EndnotesPart endnotesPart1)
        {
            Endnotes endnotes1 = new Endnotes();

            Endnote endnote1 = new Endnote() { Type = FootnoteEndnoteValues.Separator, Id = -1 };

            Paragraph paragraph40 = new Paragraph() { RsidParagraphAddition = "004805C1", RsidRunAdditionDefault = "004805C1" };

            Run run46 = new Run();
            SeparatorMark separatorMark1 = new SeparatorMark();

            run46.Append(separatorMark1);

            paragraph40.Append(run46);

            endnote1.Append(paragraph40);

            Endnote endnote2 = new Endnote() { Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0 };

            Paragraph paragraph41 = new Paragraph() { RsidParagraphAddition = "004805C1", RsidRunAdditionDefault = "004805C1" };

            Run run47 = new Run();
            ContinuationSeparatorMark continuationSeparatorMark1 = new ContinuationSeparatorMark();

            run47.Append(continuationSeparatorMark1);

            paragraph41.Append(run47);

            endnote2.Append(paragraph41);

            endnotes1.Append(endnote1);
            endnotes1.Append(endnote2);

            endnotesPart1.Endnotes = endnotes1;
        }
コード例 #9
0
        // Creates an Endnotes instance and adds its children.
        public static Endnotes CreateDefaultEndnotes()
        {
            Endnotes endnotes1 = new Endnotes()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "w14 w15 w16se w16cid w16 w16cex wp14"
                }
            };

            endnotes1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            endnotes1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
            endnotes1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
            endnotes1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
            endnotes1.AddNamespaceDeclaration("cx3", "http://schemas.microsoft.com/office/drawing/2016/5/9/chartex");
            endnotes1.AddNamespaceDeclaration("cx4", "http://schemas.microsoft.com/office/drawing/2016/5/10/chartex");
            endnotes1.AddNamespaceDeclaration("cx5", "http://schemas.microsoft.com/office/drawing/2016/5/11/chartex");
            endnotes1.AddNamespaceDeclaration("cx6", "http://schemas.microsoft.com/office/drawing/2016/5/12/chartex");
            endnotes1.AddNamespaceDeclaration("cx7", "http://schemas.microsoft.com/office/drawing/2016/5/13/chartex");
            endnotes1.AddNamespaceDeclaration("cx8", "http://schemas.microsoft.com/office/drawing/2016/5/14/chartex");
            endnotes1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            endnotes1.AddNamespaceDeclaration("aink", "http://schemas.microsoft.com/office/drawing/2016/ink");
            endnotes1.AddNamespaceDeclaration("am3d", "http://schemas.microsoft.com/office/drawing/2017/model3d");
            endnotes1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            endnotes1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            endnotes1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            endnotes1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            endnotes1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            endnotes1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            endnotes1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            endnotes1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            endnotes1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            endnotes1.AddNamespaceDeclaration("w16cex", "http://schemas.microsoft.com/office/word/2018/wordml/cex");
            endnotes1.AddNamespaceDeclaration("w16cid", "http://schemas.microsoft.com/office/word/2016/wordml/cid");
            endnotes1.AddNamespaceDeclaration("w16", "http://schemas.microsoft.com/office/word/2018/wordml");
            endnotes1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
            endnotes1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            endnotes1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            endnotes1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            endnotes1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Endnote endnote1 = new Endnote()
            {
                Type = FootnoteEndnoteValues.Separator, Id = -1
            };
            string rsidAdditionGuid = OfficeHelpers.CreateNewRsid();
            string rsidPropsGuid    = OfficeHelpers.CreateNewRsid();

            Paragraph paragraph1 = new Paragraph()
            {
                RsidParagraphAddition = rsidAdditionGuid, RsidParagraphProperties = rsidPropsGuid, RsidRunAdditionDefault = rsidAdditionGuid, ParagraphId = OfficeHelpers.CreateNewRsid(), TextId = "77777777"
            };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines()
            {
                After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };

            paragraphProperties1.Append(spacingBetweenLines1);

            Run           run1           = new Run();
            SeparatorMark separatorMark1 = new SeparatorMark();

            run1.Append(separatorMark1);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);

            endnote1.Append(paragraph1);

            Endnote endnote2 = new Endnote()
            {
                Type = FootnoteEndnoteValues.ContinuationSeparator, Id = 0
            };

            Paragraph paragraph2 = new Paragraph()
            {
                RsidParagraphAddition = rsidAdditionGuid, RsidParagraphProperties = rsidPropsGuid, RsidRunAdditionDefault = rsidAdditionGuid, ParagraphId = OfficeHelpers.CreateNewRsid(), TextId = "77777777"
            };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines()
            {
                After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto
            };

            paragraphProperties2.Append(spacingBetweenLines2);

            Run run2 = new Run();
            ContinuationSeparatorMark continuationSeparatorMark1 = new ContinuationSeparatorMark();

            run2.Append(continuationSeparatorMark1);

            paragraph2.Append(paragraphProperties2);
            paragraph2.Append(run2);

            endnote2.Append(paragraph2);

            endnotes1.Append(endnote1);
            endnotes1.Append(endnote2);
            return(endnotes1);
        }