Hi Team,
When we are trying to apply bold and Font Family it is not applying. Can you please check and confirm? what is issues and why we are unable to apply Font Family and Bold.
foreach (DocumentObject childObj in section.Paragraphs[i].ChildObjects)
{
if (childObj is TextRange)
{
TextRange tr = childObj as TextRange;
tr.CharacterFormat.FontName = "Verdana";
tr.CharacterFormat.Bold = true;
tr.CharacterFormat.Italic = true;
}
}
}
for (int i = 0; i < section.Tables.Count; i++)
{
foreach (TableRow row in section.Tables[i].Rows)
{
foreach (TableCell cell in row.Cells)
{
for (int j = 0; j < cell.Paragraphs.Count; j++)
{
foreach (DocumentObject childObj in cell.Paragraphs[j].ChildObjects)
{
if (childObj is TextRange)
{
TextRange tr = childObj as TextRange;
tr.CharacterFormat.FontName = "Verdana";
tr.CharacterFormat.Bold = true;
tr.CharacterFormat.Italic = true;
}
}
}
}
}
}
Regards,
Ravi