Good morning,
I need to add a FieldDocVariable with modifiers.
For example:
{DOCVARIABLE [varName] \ @ "ddMMyyy"}
But I do not know how to add the modifiers part so that it works.
Thank you very much for your help,
Document document = new Document();
Section section = document.AddSection();
document.CustomDocumentProperties.Add("value1", "AbCd");
Field field = section.AddParagraph().AppendField("value1", FieldType.FieldDocProperty);
field.Code = " DOCPROPERTY value1 \\* upper";
document.CustomDocumentProperties.Add("value2", "AbcD");
field = section.AddParagraph().AppendField("value2", FieldType.FieldDocProperty);
field.Code = " DOCPROPERTY value2 \\* lower";
document.IsUpdateFields = true;
string result = "result.docx";
document.SaveToFile(result, FileFormat.Docx2013);