Hi,
I can’t find any solution on your documentation or forum about how to modify bullet style.
I have some HTML with CSS to insert into a Content Control of a Word Document, so I use DocumentBuilder then insert html but I need to change the style of the bullet to a custom one. I tried to use ParagraphFormat.ListFormat but I don’t know how to use it and there is no sample about it or doc…
Find the sample code below :
C#
var path = HttpContext.Server.MapPath(@"~\Areas\CFM\Template\CFM_Template_18-06-2014.docx");
Document doc = new Document(path);
DocumentBuilder builder = new DocumentBuilder(doc);
foreach (StructuredDocumentTag sdt in doc.GetChildNodes(NodeType.StructuredDocumentTag, true))
{
if (sdt.SdtType == SdtType.RichText && sdt.Tag == "SummaryDescription")
{
var html = "- tes";
sdt.RemoveAllChildren();
var p = new Paragraph(doc);
sdt.AppendChild§;
builder.MoveTo(sdt.FirstChild);
builder.InsertHtml(html);
doc.Save(@"C:\out.docx");
}
}
Css file:
ul {
list-style-image: url("/Content/images/prisme.png");
/*list-style-image: url("…/…/Content/images/prisme.png")*/
}
ol {
list-style-image: url("/Content/images/prisme.png")
/*list-style-image: url("…/…/Content/images/prisme.png")*/
}
cf. attached file
Please provide a solution.
This message was posted using Email2Forum by Babar Raza.