docx-validate
    Preparing search index...

    Function addComment

    • Add a comment (or reply) to an unpacked DOCX.

      On success, returns the generated paraId and a human-readable status message. A first comment relates the comments parts from the stored main document's own relationships part — the part _rels/.rels names, found under OPC equivalence like the main document itself, whatever spelling either is stored under (#906, #946). On failure (missing word/ directory, missing parent comment, a part this edit would write that is stored in an encoding this tool cannot decode (#879) or is not well-formed XML (#905), a part this edit would write whose path runs through, or ends at, a symbolic link (#939), a stored comment part whose document element is not its expected root element, by namespace and local name — whatever prefix it binds (#930, #953), or, for a first comment, missing [Content_Types].xml, an _rels/.rels that cannot be decoded or parsed, an _rels/.rels naming no non-External officeDocument relationship, or an officeDocument target that, resolved as the read model resolves it (\ as /, the query and fragment dropped, a climb past the package root stopped at the root (#986), the stored part matched under OPC part-name equivalence), is a URI or names no stored part — the conventional word/document.xml included (#906, #919)), returns paraId = "" and a message starting with Error:.

      Parameters

      Returns Promise<AddCommentResult>