Hello, We are using word document templates to produce our reports.
We change the font color of some merge fields based on if a result is at target or not.
We do this using DocumentBuilder
as follows:
If e.FieldName.Equals("cholLdlAch") Then
'Here you can modify code according to your requirements.
mBuilder.MoveToMergeField(e.FieldName)
If IsDBNull(e.FieldValue) = False Then
run.Text = e.FieldValue
If bolCholLdlAtTarget = True Then
font.Color = System.Drawing.Color.Green
End If
If bolCholLdlNotAtTarget = True Then
font.Color = System.Drawing.Color.Orange
End If
If bolCholLdlNotAssessed = True Then
font.Color = System.Drawing.Color.Orange
End If
font.Size = 14
font.Name = "Calibri"
font.Bold = True
mBuilder.InsertNode(run)
End If
End If
The customer now wants to change the color of the whole table cell (whole row actually) based on if a result is at target or not.
Is this possible in Aspose? If so, do you have a code sample I could view?