Hi.
We are using Gembox to create a document with dynamic content. The document contains a table of content, and page numbers.
We are using this code to update everything before sending the document to our clients :
using var msInput = new MemoryStream(docBytes);
var doc = GemBox.Document.DocumentModel.Load(msInput);
foreach (GemBox.Document.TableOfEntries toc in doc.GetChildElements(true, GemBox.Document.ElementType.TableOfEntries))
{
toc.Update();
}
doc.GetPaginator(new GemBox.Document.PaginatorOptions() { UpdateFields = true });
using var msOutput = new MemoryStream();
doc.Save(msOutput, new GemBox.Document.DocxSaveOptions());
return msOutput.ToArray();
Everything is updating correctly, but Word is always asking the user :
Is there a way to keep updating everyting (TOC and page numbers) without asking the user to update the fields in the document?
Thanks!