2
votes

I take new DOCX document with a single run and try to add

<w:style w:type="character" w:default="1" w:styleId="QQQ">
   <w:rPr>
      <w:b/>
   </w:rPr>
</w:style>

into word/styles.xml/w:styles. I expect to see text inside my only run bold, but i don't. Run has no references to any other styles. If I change w:type to "paragraph", then my run becomes bold. From ECMA-376, it seems that style with type='character' should affect all runs. If it doesn't, what is the purpose of w:type="character"?

Thanx

1

1 Answers

0
votes

Its a fair question.

You can affect all runs by modifying w:docDefaults/w:docDefaults:

<w:styles  xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
  <w:docDefaults>
    <w:rPrDefault>
      <w:rPr>