misc_bb 7 Posted November 17, 2021 (edited) Working with OOXML in Delphi is.. interesting Now I can generate docx files by manipulating XML tags, although working with a library makes things easier. Now another hiccup is updating the table of contents. The only solution for now I have for now is the option where the user is prompted with a message box every time the Word document opens asking this screen below. I want to get rid of it or avoid this from showing up. If user selects "Yes", the table of contents is updated. This is also based on Eric White's blog: This option, is not always the best experience we want to our users. Has anyone encountered this before? Eric did mention Word automation using a macro and another is setting up word automatic services via a Sharepoint in the server, this is not going to be an option for now. So we want to automatically update TOC inside the docx file without prompting the user. If you have a suggestion, I would highly appreciate it. Thanks! Edited November 17, 2021 by misc_bb Share this post Link to post
uligerhardt 18 Posted November 17, 2021 I'd compare your original docx before and the one after the user pressed "Yes". Maybe you can see what you have to change in the differences. Share this post Link to post
misc_bb 7 Posted November 17, 2021 Well, what I'm referring here is what other option I can do to update the table of contents. This pop up box will really display because I set 'w:updateFields' to true. This is basically part of the OOXML setup for Table of Contents. In LibreOffice/ODT file, what they normally do is open the file to perform the updating of the table of contents. You know what, I think I just have an idea how to get around with this. Share this post Link to post