• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

OpenXML.WordProcessingML document processing (HOW TO XML correctly?)

sao123

Lifer
I have read a word (XML based) document into a WordProcessingML document object.

Very generically is has the form
Code:
<w:p>
  <w:r>
    <w:t>This makes a very very very wordy and deliberately overcomplicated sentence.</w:t>
  </w:r>
</w:p>

it wordwraps and breaks at the wrong place...What I need to do is insert a NonBreakingHyphen into the text sentence.
The resulting document should resemble this:

Code:
<w:p>
  <w:r>
    <w:t>This makes a very very very wordy and deliberately over</w:t>
<w:nonBreakHyphen/>
<w:t>complicated sentence.</w:t>
  </w:r>
</w:p>

How do I break a
DocumentFormat.OpenXml.Wordprocessing.Text object into 2 seperate objects, and then insert a DocumentFormat.OpenXml.Wordprocessing.NoBreakHyphen into the parent run at the correct place?

I'm not very good at editing XML in using the SDK.
 
Last edited:
Back
Top