Thank you for the useful hints!
FWIW, the following works for me (pseudo code):See also the Annotation service (as per Hubert’s suggestion).
I also assume that there always must be an 'AnnotationEnd' type portion paired with an 'Annotation' type portion? That would make sense to establish the text that’s spanned by a comment (which might span multiple paragraphs, etc.)
FWIW, the following works for me (pseudo code):
Code:
texts = par.createEnumeration()while texts.hasMoreElements(): text = texts.nextElement() if text.TextPortionType == 'Annotation': # Or 'AnnotationEnd' for the span. # text.getString() seems always empty for 'Annotation', it's just a marker/anchor, I guess. field = text.TextField # As per JeJe's comment implements the Annotation service, does not exist for 'AnnotationEnd'. comment = field.Content
I also assume that there always must be an 'AnnotationEnd' type portion paired with an 'Annotation' type portion? That would make sense to establish the text that’s spanned by a comment (which might span multiple paragraphs, etc.)
Statistics: Posted by _savage — Sun Aug 11, 2024 9:57 pm