Hi,
I am getting an additional paragraph style and wanted to know how to remove this style.
string blobtext = "";
foreach (Paragraph body in nodes)
{
if (body.Range.Text.Contains("1. OBJETIVO") == true)
{
Style newStyle = doc.Styles.AddCopy(doc.Styles["Heading 1"]);
newStyle.Name = "My Heading 1";
DocumentBuilder docbuilder = new DocumentBuilder(doc);
body.ParagraphFormat.Style = newStyle;
string text = string.Empty;
using (StreamReader streamReader = new StreamReader("C:\\Blob.htm", Encoding.UTF8))
{
text = streamReader.ReadToEnd();
}
blobtext = text;
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveTo(body);
//Insert a Paragraph break
builder.InsertParagraph();
//Insert the Paragraph to repeat it
builder.InsertHtml(blobtext);
}
}
foreach (Paragraph body in nodes)
{
foreach (Run run in body.Runs)
{
if (run.Text == "")
{
body.ParagraphFormat.ClearFormatting();
}
}
}
//doc.Save(path);
thanks in advance