Word automatically removes style properties

Home Forums WordprocessingML Word automatically removes style properties

This topic contains 0 replies, has 1 voice, and was last updated by  Michaela 2 years, 11 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11006

    Michaela
    Participant

    Hello,
    I use the OpenXMLPowerTools to merge several documents together. I changed a bit to adopt it to my needs but I have a problem independant of the OpenXMLPowerTools.

    I create a merged docx document with styles in it that uses numberings. If I look at the xml files everything looks fine (for me) but if I open the document in Word the numberings are missing. If I save the document I can see that they don’t exist anymore so Word removed them automatically. Unfortunately I don’t know why. Is anything missing that is neccessary?

    My style looks like this:

    <w:style w:type="paragraph" w:styleId="Heading1_1" w:customStyle="1">
        <w:name w:val="heading 1_1" />
        <w:basedOn w:val="Normal_1" />
        <w:next w:val="BodyText_1" />
        <w:link w:val="Heading1Char" />
        <w:uiPriority w:val="2" />
        <w:qFormat />
        <w:rsid w:val="00503917" />
        <w:pPr>
    	<w:pageBreakBefore />
    	<w:numPr>
    	    <w:numId w:val="18" />
    	</w:numPr>
    	<w:pBdr>
    	    <w:bottom w:val="single" w:sz="8" w:space="18" w:color="FF671B" />
    	</w:pBdr>
    	<w:suppressAutoHyphens />
    	<w:spacing w:before="480" w:after="120" w:line="300" w:lineRule="atLeast" />
    	<w:outlineLvl w:val="0" />
        </w:pPr>
        <w:rPr>
    	<w:rFonts w:ascii="Mark Offc For MC Light" w:eastAsiaTheme="majorEastAsia" w:hAnsi="Mark Offc For MC Light" w:cstheme="majorBidi" />
    	<w:bCs />
    	<w:sz w:val="32" />
    	<w:szCs w:val="28" />
        </w:rPr>
    </w:style>

    The numId is 18. All the styles in basedOn, next and link are present. The numbering looks like this:

    <w:num w:numId="18">
        <w:abstractNumId w:val="17" />
    </w:num>

    And the abstractnumber (I shortened it):

    <w:abstractNum w:abstractNumId="17" p16:restartNumberingAfterBreak="0" xmlns:p16="http://schemas.microsoft.com/office/word/2012/wordml">
        <w:nsid w:val="395D6507" />
        <w:multiLevelType w:val="multilevel" />
        <w:tmpl w:val="E17035D6" />
        <w:lvl w:ilvl="0">
    	<w:start w:val="1" />
    	<w:numFmt w:val="decimal" />
    	<w:pStyle w:val="Heading1_1" />
    	<w:lvlText w:val="%1" />
    	<w:lvlJc w:val="right" />
    	<w:pPr>
    		<w:tabs>
    		    <w:tab w:val="num" w:pos="0" />
    		</w:tabs>
    		<w:ind w:left="0" w:hanging="284" />
    	</w:pPr>
    	<w:rPr>
    		<w:rFonts w:hint="default" />
    		<w:color w:val="auto" />
    		<w:sz w:val="32" />
    		<w:szCs w:val="60" />
    	</w:rPr>
        </w:lvl>
        <w:lvl w:ilvl="1">
    [..]

    After saving it in Word the whole numPr element in the style is missing (The link element is missing too. I don’t know either).

    Please could anyone give me any hint what I’m doing wrong?

    Thanks a lot in advance,
    Michaela

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.