I believe that this is because you are creating a new document from scratch, and not basing your document on a template. I think the default styles come from your Normal.dotm template (in C:\Users\<userid>\AppData\Roaming\Microsoft\Templates
), and you need to base your document on this. What I have done is copy the template to the document file name and change the document type (untested C# translation from VB.NET):
public WordprocessingDocument CreateDocumentFromTemplate(string templateFileName, string docFileName)
{
File.Delete(docFileName);
File.Copy(templateFileName, docFileName);
var doc = WordprocessingDocument.Open(docFileName, true);
doc.ChangeDocumentType(WordprocessingDocumentType.Document);
return doc;
}
Your code would then be something like:
using (var doc = CreateDocumentFromTemplate(normalTemplatePath, tempPath))
{
var stylePart = doc.MainDocumentPart.StyleDefinitionsPart;
...
}
Hope that helps!