When I try to change properties for some of my text in Word all text in the document is changed.
Here is how my code looks.
cell = new Cell(doc);
Paragraph paragraph = new Paragraph(doc);
Font f = paragraph.ParagraphFormat.Style.Font;
f.Color = ColorTranslator.FromHtml(style.Color);
f.Italic = style.Style == "Italic" ? true : false;
f.Bold = style.Weight == "Bold" ? true : false;
f.Size = new Unit(style.Size).Value;
f.Name = style.Font;
Run run = new Run(doc, text ?? "");
paragraph.Runs.Add(run);
cell.Paragraphs.Add(paragraph);
I don’t really know why all text changes?
I’m only using this method once.
Cheers,
Franke