Docx Table of Content not updating

Hi,

I'm a little puzzled with this page: Table of contents — Plumsail Documents It says that ToC's are "supported", and it is also noted that this may require a manual action. I wonder what this means: Are ToC's usually updated after generating or not? And if so, is there a reason why my template's ToC doesn't?

Hi @JelleJansma,

If you use the hide-block-if condition then probably you may need to update ToC manually after generating.

Please describe what's not working in your template and share the template and JSON if it's possible. I'll reproduce the issue and report it to the developers if it's confirmed.

Best regards,
Petr
Plumsail team

Hi Peter,

That's not the case in my situation.

You'll find my template in the attachment:
Offerte Template.docx (113.8 KB)

{
  "items": [
    {
      "Id": "f1198ac5-4011-4965-bee9-a53684083190",
      "Omschrijving": "SIP OSB Spline 89mm",
      "ExtraDescription": "- Opbouw: OSB (15mm) - Polyurethaan (112mm) - OSB (15mm)\r\n- Verbinder tussen wandelementen\r\n- Elimineert koudebruggen bij paneelkoppelingen. Voor sublieme isolatie.",
      "Hosts": "W"
    },
    {
      "Id": "addb3b7c-aef8-49bd-bcea-ba34cd995af3",
      "Omschrijving": "SIP OSB 172mm, geassembleerd tot complete wand",
      "ExtraDescription": "- Wandopbouw: OSB (15mm) - Polyurethaan (142mm) - OSB (15mm)\r\n- RC-Waarde: 6,2 m² K/W\r\n- Compleet kierdichte opgebouwd\r\n- Kokers t.b.v. elektriciteitsbedrading",
      "Hosts": "W"
    },
    {
      "Id": "7a40b15b-620b-4a94-b118-1e226c83a0bc",
      "Omschrijving": "SIP OSB Spline 140mm",
      "ExtraDescription": "- Opbouw: OSB (15mm) - Polyurethaan (112mm) - OSB (15mm)\r\n- Verbinder tussen wandelementen\r\n- Elimineert koudebruggen bij paneelkoppelingen. Voor sublieme isolatie.",
      "Hosts": "W"
    }
  ]
}

Thank you so much!

Hello Petr,

Are the any updates?

Jelle

Hello @JelleJansma,

Thanks for the document and the JSON. I reproduced the issue: indeed, you need to update ToC to make it visible in the resulting document (not only for hide-if condition but in all cases). Also, I confirmed with our developers that the behavior is by design.

Best regards,
Petr
Plumsail team

Hello Petr,

So, for my understanding: Is updating of ToC's not supported at all in Plumsail or is there something that I need to change in my template to make it work?

And if updating ToC's is not supported; is there any chance that this feature is added in the near future? To be honest, I would be a bit suprised that a tool so rich in features lacks such a basic document generation feature, especially since it's only one line of code to update ToC's.

Thanks for your support so far!

Jelle

Hi @JelleJansma,

There are 2 options to get the ToC updated automatically:

  1. You can configure Word setting in the template to update files before printing. This will update the Table of contents on printing:

If you selected PDF as an output, this option is set automatically and the result PDF will contain an updated table of contents.

  1. or you can add a macro to update the table of contents on open.

Best regards,
Petr
Plumsail team

Thanks, both solutions don't work for me though. Anyway, I will leave the ToC out for now.