Is this the only way to update the whole table of contents in a word. There are items that are not updated after running the below, is there something I’m missing or is there another way to update this?
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC1).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC3).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC2).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC_HEADING).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC4).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC5).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC6).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC7).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC8).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOC9).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TOA_HEADING).font.name = ""
doc.styles.get_by_style_identifier(aw.StyleIdentifier.TABLE_OF_AUTHORITIES).font.name = ""