Page 1 of 1

Re: Get style of text from text object

PostPosted: Mon Feb 18, 2013 11:06 pm
by jason
mmoselhy wrote:Can I get the style of text object directly or can I get the paragraph for text object?
or should I traverse and keep the paragraph for each text to get the style from ?


Paragraph properties are stored at the paragraph level; run properties are stored at the run level (w:r) parent of w:t.

Depending what you are trying to do, you should probably traverse and keep the paragraph and/or run properties.

mmoselhy wrote:also, sometimes when I traverse I get this element printed -- > org.docx4j.wml.ProofError what does it represent to avoid?


Word puts that in where there is a grammatical or spelling error if that feature is enabled. You can clean these out with WordprocessingMLPackage's filter method.