I am trying to run document.UpdateFields() on a preprocessed document but it is throwing the below exception
at . ()
at . ()
at .( )
at . ( )
at .( )
at .( )
at . ()
at . ()
at .()
at .(Node )
at Aspose.Words.Document.UpdateFields()
at AsposeTest.Program.Main(String[] args) in C:\Users\vishnu.p\source\repos\AsposeTest\AsposeTest\Program.cs:line 18
Below is the logic used to update fields
static void Main(string[] args)
{
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense("Aspose.Total.lic");
var document = new Document(@"C:/preprocessdoc _modified.docx");
try
{
document.UpdateFields();
document.Save(@"C:/preprocessdoc2.docx");
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
Please find the attached document:
preprocessdoc _modified.docx (912.8 KB)