DocumentFormat.OpenXml.VariableReplacer (nuget): using (WordprocessingDocument document = WordprocessingDocument.Open(filePath, true)) { MainDocumentPart mainPart = document.MainDocumentPart; Dictionary<string, string> replacers = new Dictionary<string, string>(32); _openXmlVariableReplacer.ReplaceVariables(mainPart.Document, replacers); }
Keywords: openxml|office|variable