sao123
Lifer
I have read a word (XML based) document into a WordProcessingML document object.
Very generically is has the form
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:
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.
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: