i build a empty document with some headings, but when i open the document, i found some of heading with different style between the word’s default style.
for example, the Heading2 style is italic, but in word default does not have talic style. my code is below:
Document doc = new Document();
doc.AttachedTemplate = "";
DocumentBuilder builder = new DocumentBuilder(doc);
Console.WriteLine("Template: {0}", doc.BuiltInDocumentProperties.Template);
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading1;
builder.Writeln("Heading 1");
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading2;
builder.Writeln("Heading 1.1");
builder.Writeln("Heading 1.2");
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading1;
builder.Writeln("Heading 2");
builder.Writeln("Heading 3");
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading2;
builder.Writeln("Heading 3.1");
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading3;
builder.Writeln("Heading 3.1.1");
builder.Writeln("Heading 3.1.2");
builder.Writeln("Heading 3.1.3");
builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading2;
builder.Writeln("Heading 3.2");
builder.Writeln("Heading 3.3");
i tried using “Normal.dotm”:
var templateBuilder = new DocumentBuilder(new Document(defaultTemplateFile));
but the result style is changing to another way which like the resource file “AllStyles2007.docx” in Aspose.Words assambly.
how can i use the exactly word2010 default style?
i use 13.10~13.12, the result is same.