Skip to content

Index - Table of Contents, update #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wb4r opened this issue Oct 16, 2017 · 6 comments
Closed

Index - Table of Contents, update #436

wb4r opened this issue Oct 16, 2017 · 6 comments

Comments

@wb4r
Copy link

wb4r commented Oct 16, 2017

Hi, I've read the docs and searched through the issues but haven't found the solution, if there is any. I am working on a medium size docx file creator and at the end of it, after populating vars and paragraphs I would like to update the Index at the beginning. This function is offered when clicking on the mentioned index and a blue little label is shown with an arrow. When clicking on it we can "Update table..."

Is there an implementation of this in the library?

Much appreciated,

nM

@scanny
Copy link
Contributor

scanny commented Oct 16, 2017

Try searching on 'python-docx table of contents'. This topic has been well-discussed, here for example #36.

@wb4r
Copy link
Author

wb4r commented Oct 23, 2017

Thanks for the tip

@scanny scanny closed this as completed Oct 23, 2017
@botzill
Copy link

botzill commented Nov 23, 2018

Hi, not sure what are the latest changes related to this issue, but seems that there is method qn anymore. Any updates on this ?

@scanny
Copy link
Contributor

scanny commented Nov 24, 2018

The qn() method is in the docx.oxml.ns module:

from docx.oxml.ns import qn

@deepak-coding-art
Copy link

Did you fond a solution to update the indexes in table of content without prompting user

@nang-dev
Copy link

Also wondering this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants