I have a template that has a style applied in the Content Control Properties (Heading 1). However, when the text replacements are done, the styling is not there:
Edit in Word
After the replacement:
Code:
// Replace standard content controls
var engine = new DefaultOpenXmlTemplateEngine();
var data = new
{
meeting = new
{
title = "ICT Overleg",
when = "24 feb. 2024",
where = "Meeting room: Zolder"
}
};
using var template = new TemplateDocument(wordDoc);
var src = new VariableSource(JsonConvert.SerializeObject(data));
engine.ReplaceAll(template, src);
I have a template that has a style applied in the Content Control Properties (Heading 1). However, when the text replacements are done, the styling is not there:
Edit in Word
After the replacement:
Code:
Environment