Our application generates a Word document using Syncfusion's DocIO libs. Basically, we load a template and insert into it specific texts in specific bookmarks, generating a Word document that the user downloads on-the-fly.
The issue we are facing is:
- The template is 4 pages long and has TOC.
- As we add content, the document size in pages increases (naturally)
- When the document is downloaded, the TOC still reflects the page numbers used in the template. In other words, the user must manually update the TOC (secondary click -> update field) in order to refresh the page numbers.
According Syncfusion's documentation (which is scarce...) this is not possible using their lib. So, we implemented an AutoOpen macro in the template that updates the TOC when the doc is opened as a workaround. However, this causes a security warning when opening the file (because of the macro), which makes our uses uncomfortable.
Does any of you have an idea to improve this implementation?
Thanks,
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…