Esempio n. 1
0
        // Creates an Numbering instance and adds its children.
        public static DocumentFormat.OpenXml.Wordprocessing.Numbering GenerateNumbering()
        {
            DocumentFormat.OpenXml.Wordprocessing.Numbering numberingPart = new DocumentFormat.OpenXml.Wordprocessing.Numbering()
            {
                MCAttributes = new MarkupCompatibilityAttributes()
                {
                    Ignorable = "w14 wp14"
                }
            };
            numberingPart.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            numberingPart.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            numberingPart.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            numberingPart.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            numberingPart.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            numberingPart.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            numberingPart.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            numberingPart.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            numberingPart.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            numberingPart.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            numberingPart.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            numberingPart.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            numberingPart.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            numberingPart.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            numberingPart.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            numberingPart.Append(GenerateAbstractNum10());
            numberingPart.Append(GenerateAbstractNum18());
            numberingPart.Append(GenerateNumberingInstance7());
            numberingPart.Append(GenerateNumberingInstance8());

            return(numberingPart);
        }
Esempio n. 2
0
 public static DocumentFormat.OpenXml.Wordprocessing.Numbering GenerateNumbering()
 {
     DocumentFormat.OpenXml.Wordprocessing.Numbering num = new DocumentFormat.OpenXml.Wordprocessing.Numbering();
     num.Append(GenerateAbstractNum());
     num.Append(GenerateNumberingInstance());
     return(num);
 }