I have the next source code to search list in a word document and create a treeview only with the list items of docs:
export async function getChaptersAndSte