I have a problem whereby updating the TOC with Aspose.Words by calling UpdateFields does not actually update the TOC. It does break our TOC as I cannot even manually update the TOC afterwards.
I have tried doing this with the current latest version of Aspose.Words which is 220.127.116.11.
Using the following code:
public static byte UpdateTableOfContents(byte inDocument)
byte GeneratedFileBytes = null;
var docLicense = new License();
using (MemoryStream wordDocumentStream = new MemoryStream(inDocument, 0, inDocument.Length))
wordDocument = new Document(wordDocumentStream);
using (MemoryStream docStream = new MemoryStream())
var byteArray = docStream.ToArray();
GeneratedFileBytes = byteArray;
We would appreciate your help with this.