You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
Environment
.NET6
Console Application
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: