none
Word Paragraph Why font is not BOLD RRS feed

  • Question

  • <w:p w:rsidR="00623D23" w:rsidRDefault="005105DE">
    			<w:pPr>
    				<w:pStyle w:val="2"/>
    			</w:pPr>
    			<w:bookmarkStart w:id="0" w:name="_GoBack"/>
    			<w:bookmarkEnd w:id="0"/>
    			<w:r>
    				<w:rPr>
    					<w:rStyle w:val="2Char"/>
    					<w:rFonts w:hint="eastAsia"/>
    					<w:sz w:val="24"/>
    				</w:rPr>
    				<w:t>ABCD Sample</w:t>
    			</w:r>
    		</w:p>
    <w:style w:type="character" w:customStyle="1" w:styleId="2Char">
    		<w:name w:val="标题 2 Char"/>
    		<w:link w:val="2"/>
    		<w:uiPriority w:val="9"/>
    		<w:rsid w:val="008A3BBE"/>
    		<w:rPr>
    			<w:rFonts w:ascii="Cambria" w:eastAsia="宋体" w:hAnsi="Cambria" w:cs="Times New Roman"/>
    			<w:b/>
    			<w:sz w:val="48"/>
    			<w:szCs w:val="32"/>
    		</w:rPr>
    	</w:style>
    <w:style w:type="paragraph" w:styleId="2">
    		<w:name w:val="heading 2"/>
    		<w:basedOn w:val="a"/>
    		<w:next w:val="a"/>
    		<w:link w:val="2Char"/>
    		<w:uiPriority w:val="9"/>
    		<w:unhideWhenUsed/>
    		<w:qFormat/>
    		<w:rsid w:val="008A3BBE"/>
    		<w:pPr>
    			<w:keepNext/>
    			<w:keepLines/>
    			<w:spacing w:before="260" w:after="260" w:line="416" w:lineRule="auto"/>
    			<w:outlineLvl w:val="1"/>
    		</w:pPr>
    		<w:rPr>
    			<w:rFonts w:ascii="Cambria" w:hAnsi="Cambria"/>
    			<w:b/>
    			<w:bCs/>
    			<w:sz w:val="32"/>
    			<w:szCs w:val="32"/>
    		</w:rPr>
    	</w:style>

    <w:b/>
    Not bold
    I want to convert word to html , So I want to known when set font-weight:bold or normal.


    XBRL Expert

    Saturday, February 3, 2018 8:55 AM

Answers

  • I notice :

    Toggle Properties 
    Certain character properties defined in §17.3.2 are specified as toggle properties. [Example: the Bold and Italics properties are toggle properties. end example] As indicated in the previous two sections (§17.7.1 and §17.7.2) several styles can affect the formatting applied to a given piece of content within a WordprocessingML document. When the same formatting property appears in one or more styles that affect the content applied to a run, the combined effect depends on whether or not the formatting property is a toggle property. 

     688 / 5585


    XBRL Expert

    Monday, February 5, 2018 7:11 AM

All replies

  • Sample Document 

    XBRL Expert

    Saturday, February 3, 2018 10:12 AM
  • Hello Chen,

    We could find the paragraph is set a characters style and the style id is "2Char".

    We could try to get the style setting from the styles list according to the style id.

    Here is the style setting for "2Char".

     <w:style w:type="character" w:styleId="2Char" w:customStyle="1">
        <w:name w:val="标题 2 Char" />
        <w:link w:val="2" />
        <w:uiPriority w:val="9" />
        <w:rsid w:val="008A3BBE" />
        <w:rPr>
          <w:rFonts w:ascii="Cambria" w:hAnsi="Cambria" w:eastAsia="宋体" w:cs="Times New Roman" />
          <w:b />
          <w:sz w:val="48" />
          <w:szCs w:val="32" />
        </w:rPr>
      </w:style>

    We could find the <w:b /> tag in the style setting which will set text bold once using this style.

    So, except checking if there is bold setting in properties, you need also check if there is bold setting in style properties once the text has been set style.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, February 5, 2018 6:12 AM
  • I notice :

    Toggle Properties 
    Certain character properties defined in §17.3.2 are specified as toggle properties. [Example: the Bold and Italics properties are toggle properties. end example] As indicated in the previous two sections (§17.7.1 and §17.7.2) several styles can affect the formatting applied to a given piece of content within a WordprocessingML document. When the same formatting property appears in one or more styles that affect the content applied to a run, the combined effect depends on whether or not the formatting property is a toggle property. 

     688 / 5585


    XBRL Expert

    Monday, February 5, 2018 7:11 AM