Hi,
Document doc = new Document(MyDir + "in.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToBookmark("bookmark1");
builder.Font.Bold = true;
builder.Font.Italic = true;
builder.Write("bookmark 1 text 1");
builder.Font.ClearFormatting();
builder.Font.Underline = Underline.Single;
builder.MoveToBookmark("bookmark2");
builder.Write("bookmark 2 text 1");
doc.Save(MyDir + @"output.docx");
My question is little differnt, taking your sample code, I have choose bookmark1 again to print another text, which should append with previous text. Please note that bookmark1 should contain 2 text with different style.
Document doc = new Document(MyDir + "in.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToBookmark("bookmark1");
builder.Font.Bold = true;
builder.Font.Italic = true;
builder.Write("bookmark 1 text 1");
builder.Font.ClearFormatting();
builder.Font.Underline = Underline.Single;
builder.MoveToBookmark("bookmark2");
builder.Write("bookmark 2 text 1");
builder.MoveToBookmark("bookmark1");
builder.Font.Underline = true;
builder.Write("bookmark 1 text 1");
doc.Save(MyDir + @"output.docx");
Never mind, I understand that is word property.