Example #1
0
        public void StartComment(string commentId)
        {
            Run run = new Run();

            AnnotationReferenceMark annotationReferenceMark =
                new AnnotationReferenceMark();

            run.Append(annotationReferenceMark);

            _runList.Add(run);

            CommentRangeStart commentRangeStart = new CommentRangeStart()
            {
                Id = commentId
            };

            _runList.Add(commentRangeStart);
        }
        // Generates content of wordprocessingCommentsPart1.
        private void GenerateWordprocessingCommentsPart1Content(WordprocessingCommentsPart wordprocessingCommentsPart1)
        {
            Comments comments1 = new Comments(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15 wp14" }  };
            comments1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            comments1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            comments1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            comments1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            comments1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            comments1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            comments1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            comments1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            comments1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            comments1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            comments1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            comments1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            comments1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            comments1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            comments1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            comments1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Comment comment1 = new Comment(){ Initials = "M.T", Author = "Masaki Tamura (Pasona Tech)", Date = System.Xml.XmlConvert.ToDateTime("2012-01-19T19:33:00Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Id = "1" };

            Paragraph paragraph3 = new Paragraph(){ RsidParagraphAddition = "009423EF", RsidRunAdditionDefault = "009423EF", ParagraphId = "549EEC1D", TextId = "77777777" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId(){ Val = "a4" };

            paragraphProperties1.Append(paragraphStyleId1);

            Run run6 = new Run();

            RunProperties runProperties6 = new RunProperties();
            RunStyle runStyle4 = new RunStyle(){ Val = "a3" };

            runProperties6.Append(runStyle4);
            AnnotationReferenceMark annotationReferenceMark1 = new AnnotationReferenceMark();

            run6.Append(runProperties6);
            run6.Append(annotationReferenceMark1);

            Run run7 = new Run();

            RunProperties runProperties7 = new RunProperties();
            RunFonts runFonts6 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties7.Append(runFonts6);
            Text text3 = new Text();
            text3.Text = "Comment1";

            run7.Append(runProperties7);
            run7.Append(text3);

            paragraph3.Append(paragraphProperties1);
            paragraph3.Append(run6);
            paragraph3.Append(run7);

            comment1.Append(paragraph3);

            Comment comment2 = new Comment(){ Initials = "M.T", Author = "Masaki Tamura (Pasona Tech)", Date = System.Xml.XmlConvert.ToDateTime("2012-01-19T19:33:00Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Id = "2" };

            Paragraph paragraph4 = new Paragraph(){ RsidParagraphAddition = "009423EF", RsidRunAdditionDefault = "009423EF", ParagraphId = "6FD4E96D", TextId = "77777777" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId(){ Val = "a4" };

            paragraphProperties2.Append(paragraphStyleId2);

            Run run8 = new Run();

            RunProperties runProperties8 = new RunProperties();
            RunStyle runStyle5 = new RunStyle(){ Val = "a3" };

            runProperties8.Append(runStyle5);
            AnnotationReferenceMark annotationReferenceMark2 = new AnnotationReferenceMark();

            run8.Append(runProperties8);
            run8.Append(annotationReferenceMark2);

            Run run9 = new Run();

            RunProperties runProperties9 = new RunProperties();
            RunFonts runFonts7 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties9.Append(runFonts7);
            Text text4 = new Text();
            text4.Text = "Comment2";

            run9.Append(runProperties9);
            run9.Append(text4);

            paragraph4.Append(paragraphProperties2);
            paragraph4.Append(run8);
            paragraph4.Append(run9);

            comment2.Append(paragraph4);

            Comment comment3 = new Comment(){ Initials = "M.T", Author = "Masaki Tamura (Pasona Tech)", Date = System.Xml.XmlConvert.ToDateTime("2012-01-19T19:33:00Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Id = "3" };

            Paragraph paragraph5 = new Paragraph(){ RsidParagraphAddition = "009423EF", RsidRunAdditionDefault = "009423EF", ParagraphId = "560BF315", TextId = "77777777" };

            ParagraphProperties paragraphProperties3 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId3 = new ParagraphStyleId(){ Val = "a4" };

            paragraphProperties3.Append(paragraphStyleId3);

            Run run10 = new Run();

            RunProperties runProperties10 = new RunProperties();
            RunStyle runStyle6 = new RunStyle(){ Val = "a3" };

            runProperties10.Append(runStyle6);
            AnnotationReferenceMark annotationReferenceMark3 = new AnnotationReferenceMark();

            run10.Append(runProperties10);
            run10.Append(annotationReferenceMark3);

            Run run11 = new Run();

            RunProperties runProperties11 = new RunProperties();
            RunFonts runFonts8 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties11.Append(runFonts8);
            Text text5 = new Text();
            text5.Text = "Comment3";

            run11.Append(runProperties11);
            run11.Append(text5);

            paragraph5.Append(paragraphProperties3);
            paragraph5.Append(run10);
            paragraph5.Append(run11);

            comment3.Append(paragraph5);

            comments1.Append(comment1);
            comments1.Append(comment2);
            comments1.Append(comment3);

            wordprocessingCommentsPart1.Comments = comments1;
        }
        // Generates content of wordprocessingCommentsPart1.
        private void GenerateWordprocessingCommentsPart1Content(WordprocessingCommentsPart wordprocessingCommentsPart1)
        {
            Comments comments1 = new Comments(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15 wp14" }  };
            comments1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            comments1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            comments1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            comments1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            comments1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            comments1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            comments1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            comments1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            comments1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            comments1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            comments1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            comments1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            comments1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            comments1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            comments1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            comments1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Comment comment1 = new Comment(){ Initials = "M.T", Author = "Masaki Tamura (Pasona Tech)", Date = System.Xml.XmlConvert.ToDateTime("2012-04-04T13:52:00Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Id = "1" };

            Paragraph paragraph2 = new Paragraph(){ RsidParagraphAddition = "00C47703", RsidRunAdditionDefault = "00C47703", ParagraphId = "61B2BF87", TextId = "77777777" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId(){ Val = "CommentText" };

            paragraphProperties1.Append(paragraphStyleId1);

            Run run4 = new Run();

            RunProperties runProperties4 = new RunProperties();
            RunStyle runStyle3 = new RunStyle(){ Val = "CommentReference" };

            runProperties4.Append(runStyle3);
            AnnotationReferenceMark annotationReferenceMark1 = new AnnotationReferenceMark();

            run4.Append(runProperties4);
            run4.Append(annotationReferenceMark1);

            Run run5 = new Run();

            RunProperties runProperties5 = new RunProperties();
            RunFonts runFonts5 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties5.Append(runFonts5);
            Text text2 = new Text();
            text2.Text = "A";

            run5.Append(runProperties5);
            run5.Append(text2);

            paragraph2.Append(paragraphProperties1);
            paragraph2.Append(run4);
            paragraph2.Append(run5);

            comment1.Append(paragraph2);

            Comment comment2 = new Comment(){ Initials = "M.T", Author = "Masaki Tamura (Pasona Tech)", Date = System.Xml.XmlConvert.ToDateTime("2012-04-04T13:52:00Z", System.Xml.XmlDateTimeSerializationMode.RoundtripKind), Id = "2" };

            Paragraph paragraph3 = new Paragraph(){ RsidParagraphAddition = "00C47703", RsidRunAdditionDefault = "00C47703", ParagraphId = "216A897E", TextId = "77777777" };

            ParagraphProperties paragraphProperties2 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId(){ Val = "CommentText" };

            paragraphProperties2.Append(paragraphStyleId2);

            Run run6 = new Run();

            RunProperties runProperties6 = new RunProperties();
            RunStyle runStyle4 = new RunStyle(){ Val = "CommentReference" };

            runProperties6.Append(runStyle4);
            AnnotationReferenceMark annotationReferenceMark2 = new AnnotationReferenceMark();

            run6.Append(runProperties6);
            run6.Append(annotationReferenceMark2);

            Run run7 = new Run();

            RunProperties runProperties7 = new RunProperties();
            RunFonts runFonts6 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };

            runProperties7.Append(runFonts6);
            Text text3 = new Text();
            text3.Text = "B";

            run7.Append(runProperties7);
            run7.Append(text3);

            paragraph3.Append(paragraphProperties2);
            paragraph3.Append(run6);
            paragraph3.Append(run7);

            comment2.Append(paragraph3);

            comments1.Append(comment1);
            comments1.Append(comment2);

            wordprocessingCommentsPart1.Comments = comments1;
        }