We have a Word document here which contains a number of hidden paragraphs, including headings. Depending on the respective view/print setting, these paragraphs are (or are not) shown/printed - all fine.

However, independent on these settings, the prespective headings never appear in the table of contents.

Is there a way around this? I'd like to appear the headings in the TOC if and only if they're visible, per the view setting.

  • I don't think it's possible to include the heading in the TOC based on the current view settings. You can either exclude it fully or include it fully (using TC fields). One possible idea is that you can use a macro which detects when the document view is changed and unhides hidden text etc. – Adam Mar 13 '14 at 22:13
  • Thought about macros as well, but am very reluctant about actually tapering with the (non-generated) document content: I'm pretty sure that at some point, the document would end up with these (temporary) changes being persisted by the users, and probably modified to an extent where the macro would work anymore. – Frank Schönheit Mar 24 '14 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.