docx icon indicating copy to clipboard operation
docx copied to clipboard

Add comments part

Open BrentFarese opened this issue 5 years ago • 2 comments

Feature Request:

ECMA Office Open XML Part 1 - Section 11.3.2 specifies a Comments Part for Word documents. Section 17.13 also outlines Annotations including Comments at Section 17.13.4. I cannot find detailed reference to the comments part on officeopenxml.com, which is somewhat weird.

In any case, it would be great if DOCX had comment support so we could build comments into a document. Is this a highly-requested feature? We might be able to dedicate some resources to trying to implement it.

Thanks!

Some snippets from the ECMA spec:

Screen Shot 2020-11-02 at 9 34 26 PM Screen Shot 2020-11-02 at 9 34 45 PM

BrentFarese avatar Nov 03 '20 02:11 BrentFarese

Would love to have that feature, too. Here are the references from the Microsoft API References. They usually also provide a few examples. It seems that commentReference, comments/ comment, commentRangeStart and commentRangeEnd are needed.

  • https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.comment?view=openxml-2.8.1
  • https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.commentrangestart?view=openxml-2.8.1
  • https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.commentrangeend?view=openxml-2.8.1
  • https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.commentreference?view=openxml-2.8.1

thojansen avatar Nov 03 '20 07:11 thojansen

I have made a pr for this feature.

https://github.com/dolanmiu/docx/pull/1448

chenyuncai avatar Mar 03 '22 02:03 chenyuncai