Field codes not working for multiple TOCs in one docx

I prepared one docx to demonstrate this trouble:

Multiple TOCs in one docx test.docx (52.4 KB)

What I want:

Let it be a docx very very long over thousands of pages, so, there will be many chapters and many headings level 1, 2, 3, only one TOC in the beginning of the docx is not enough, I want one root TOC in the beginning, lists only of heading level 1, and then, make one TOC for every chapter, listing headings level 2, 3, all belong to this chapter. All these TOCs are different, and should be refreshed automatically when I save or open the docx.

How to make this?

by fields code, the new function of ONLYOFFICE Doc latest updates, it should be ok, as I used to do this in MS Office Word.

It’s not difficult:

create a bookmark with all one chapter selected

as you can see in the docx I uploaded in this post, all the snapshots here are taken in the docx, and then,

create the TOC for one Chapter with field codes:

It’s very easy:

TOC \b Chapter2 \o "2-9"

all the work should be done, and the TOC should be right here, but

ONLYOFFICE do not execute my code

here:

I’m sure the codes is right, because, I open this docx in MS word and refresh all the fields, MS word do all the work right:

1.1 and 1.2 do NOT appear in this TOC for chapter 2, this is right, the right field code run correctly in MS word but not in ONLYOFFICE Doc now.

the questions

Is this a bug? or incomplete function of ONLYOFFICE developing updates?

BTW

My environment is Windows 10, ONLYOFFICE Desktop Editor the newest version

Hello @VincentYoung

Thanks for the file. We are analyzing it, I will let you know the results.

Some information I was able to find: currently \b operator does not work properly, bug was registered and we are working on it. Once it is resolved we do additional checks on how it works with \o operator to make sure that this scenario is successfully executing.

Thanks for your work, so, I’m waiting for your good news.
Btw, another problem, the filed code TC is still not available in ONLYOFFICE now. in MS office word, filed code TC is always used in pair with filed code TOC, these two always appears together

Please start a new topic as either a suggestion or bug for mentioned field code. We will review it.