I have a simple code below to update document fields and header/footer fields. In the test document, I include Title and Author fields. However, the code doesn’t work for me. Title and Author properties are change, but the fields in output document aren’t changed anymore though. I attach input/output document. Could you help to review if I miss something?
Aspose.Words.Document doc = new Aspose.Words.Document("Test.docx"); doc.UpdateFields(); doc.FirstSection.HeadersFooters[Aspose.Words.HeaderFooterType.HeaderPrimary].Range.UpdateFields(); doc.FirstSection.HeadersFooters[Aspose.Words.HeaderFooterType.FooterPrimary].Range.UpdateFields(); doc.Save("Test1.docx");
Thanks in advance.