We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ParagraphFormat.Style returns incorrect font values using C#

Hello! I found a bug when reading the font for first paragraph in last section. I open it and can see it is Comic Sans MS, but in code, it is read as Times New Roman, although Times New Roman is nowhere used in the document.
I attach a test project.


Hi Dragos,

Thanks for your query. I have tested the scenario and have managed to reproduce the same problem at my end. I have logged this issue in our issue tracking system and you will be notified via this
forum thread once this issue is resolved.

Please use the following code snippet for a workaround.

<!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}


var doc = new Document(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.docx"));

Console.WriteLine("Test first paragraph in last section font");

Console.WriteLine("Expected Font: Comic Sans MS");

//Console.WriteLine("Actual Font: " + doc.LastSection.Body.Paragraphs[1].ParagraphFormat.Style.Font.Name);

Console.WriteLine("Actual Font: " + doc.LastSection.Body.Paragraphs[1].Runs[0].Font.Name);


Thanks for your inquiry. I closed the issue as “Not a Bug”. Actually, formatting of text in MS Word documents can be defined on few different levels:

1. Paragraph style defined for the particular paragraph;

2. Character style defined for the particular run;

3. Explicit formatting specified for a particular run.

For more information, please see the following link:


So you cannot determine whether paragraph has for example bold text by checking just paragraph’s style. There can be a run with bold text.

Hope this helps. Please let me know if you need more assistance, I will be glad to help you.

Best regards,