Table style question
-
Donnerstag, 10. Januar 2008 17:23Hi,
I have a tablestyle and I'd like to use it with a table. The table doesn't have any formatting tag, it uses the style only (it is a restriction).
The first row of the table should look different than the other rows. To do this, I use the tblStylePr tag with the type of FirstRow. It works fine but here comes this problem that is so annoying.
Here is the code:
Code Block<w:style w:type='table' w:styleId='TblStyle1' xmlns:w='http://schemas.openxmlformats.org/wordprocessingml/2006/main'>
<w:pPr>
<w:jc w:val='both'/>
</w:pPr>
<w:rPr>
<w:b/>
<w:rFonts w:ascii='Courier'/>
<w:sz w:val='18'/>
</w:rPr>
<w:tcPr>
<w:vAlign w:val='top'/>
</w:tcPr>
<w:tblStylePr w:type='firstRow'>
<w:rPr>
<w:jc w:val='left'/>
<w:rFonts w:ascii='Courier'/>
<w:sz w:val='50'/>
<w:color w:val='000000'/>
</w:rPr>
<w:tcPr>
<w:vAlign w:val='bottom'/>
</w:tcPr>
</w:tblStylePr>
</w:style>
This code tells that the runs in the table should be bold but in the first row, the runs should look different and should NOT to be bold (because the runs are overriden by the last rPr, I suppose).
The modifications of the first row are working (the size of font etc.) but the italic and bold properties stay untouched. Can I mask them out somehow? (as I mentioned, I cannot use tblLook and other tag located in document.xml)
With this behaviour it looks like adding tblStylePr could only add plus properties (I have a pink shirt on and I put on a yellow hat and a red jacket , but the shirt is still on).
Alle Antworten
-
Montag, 14. Januar 2008 18:40No ideas at all?
More than 300 views and no posts, this means the problem is quite hard to solve. I reposted the problem at openxmldeveloper.org, maybe they will have something to suggest. -
Donnerstag, 17. Januar 2008 21:31
Well, well, well.
As I thought, solution was impossibly simple, especially for people who invented and developed OpenXML.
Thus, I have to set the bold value to '0' to override the previous rPr.

