on-internet
← Community

Using python-docx's _document method

Stack Overflow ·

I am using python-docx and am trying to insert the a <w:bookmarkStart> tag. I do not see any immediate API method to create the tag. So I googled several references to gain access to the raw XML using the document._document_part attribute. However, when I attempt to use it, python tells me it does not exist: >>> import docx >>> document = docx.Document() >>> print document._document_part Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Document' object has no attribute '_document_part' I am using python-docx 0.8.5. Is there a method to add a <w:bookmarkSt

Comments

Sign in or sign up to comment and upvote.

No comments yet.