Hello again Jos, do you have any test files, where text:outline-level is set to zero? That means no paragraph styles to format TOC were found. And I would like to fix that. - cwriter->addAttribute("text:outline-level", levels); + if (levels > 0) { + cwriter->addAttribute("text:outline-level", levels); + }