Share via

document.xml <w:pStyle w:val="Heading4" vs <w:pStyle w:val="4"/>

Anonymous
2024-08-30T02:29:23+00:00

I have two document generated by different word version, I rename the .docx to .7z and then unzip it, then go to the word\document.xml, I find one document use <w:pPr><w:pStyle w:val="Heading4"/></w:pPr>

and another document, generated by different word, use

<w:pPr><w:pStyle w:val="4"/></w:pPr>

When will use "Heading4" and when will use "4" in document.xml?

Similar for "HeadingX" vs "X" where X is a digit

Microsoft 365 and Office | Word | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Charles Kenyon 167.4K Reputation points Volunteer Moderator
    2024-09-03T04:37:23+00:00

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-09-02T06:16:53+00:00

    I have uploaded the testing file to here, see if this helps, thanks.

    https://easyupload.io/mc6vvr

    Was this answer helpful?

    0 comments No comments
  3. John Korchok 232.4K Reputation points Volunteer Moderator
    2024-08-30T14:39:31+00:00

    I cannot create that XML using Word 2016 MSO (Version 2406 Build 16.0.17726.20078) 32-bit. Applying built-in heading styles in that version creates the HeadingX syntax. This is also what happens with all other versions of Word I've tested.

    Editing the XML to the X syntax causes all styles text to revert to Normal style. This is also what happens with all other versions of Word I've tested.

    It appears your copy of Word is very out of date, it should be updated.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2024-08-30T03:45:58+00:00

    as follow:

    the top part of document.xml, if useful for investigation, is as follow

    http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se wp14">

    Not just 4, but also 1,2,3

    <w:pPr><w:pStyle w:val="1"/></w:pPr>

    <w:pPr><w:pStyle w:val="2"/></w:pPr>

    <w:pPr><w:pStyle w:val="3"/></w:pPr>

    <w:pPr><w:pStyle w:val="4"/></w:pPr>

    Was this answer helpful?

    0 comments No comments
  5. John Korchok 232.4K Reputation points Volunteer Moderator
    2024-08-30T03:13:45+00:00

    Which versions are you testing?

    In Word 2007 and the current version of Word 365, neither one successfully interprets

    <w:pPr><w:pStyle w:val="4"/></w:pPr>

    to apply the built-in Heading 4 style.

    Was this answer helpful?

    0 comments No comments