Share via

Changing the multiple languages set in a document to 1 language

Anonymous
2024-01-10T15:04:58+00:00

I am trying to parse through the document.xml file that is created by a word document. The document has been modified by different people. There is a value in an column that displays in the word document as 0x03 but when I check the document.xml I see

                    <w:r w:rsidRPr="00811BF7"> 

                        <w:rPr> 

                            <w:rFonts w:eastAsia="DengXian" w:cs="Times New Roman"/> 

                            <w:szCs w:val="21"/> 

                        </w:rPr> 

                        <w:t>0x</w:t> 

                    </w:r> 

                    <w:r w:rsidRPr="00811BF7"> 

                        <w:rPr> 

                            <w:rFonts w:eastAsia="DengXian" w:cs="Times New Roman"/> 

                            <w:szCs w:val="21"/> 

                            <w:lang w:eastAsia="zh-CN"/> 

                        </w:rPr> 

                        <w:t>03</w:t> 

                    </w:r>

It looks like the w:lang is set for the "03" only. There is multiple instances of this throughout the document. Is there anyway to remove this?

Andy

Microsoft 365 and Office | Word | For business | 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

2 answers

Sort by: Most helpful
  1. Charles Kenyon 167.8K Reputation points Volunteer Moderator
    2024-01-10T15:50:51+00:00

    In Word, not XML, select the entire document and set the proofing language.

    Turn off the option to automatically detect language.

    Is there some reason you need to work on the XML?

    If so, I would recommend asking in Stack Overflow detailing what it is you are doing. Add a tag for XML.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-01-11T08:20:55+00:00

    I have tried this and it does not change the XML.

    I am working on the XML because it is used by a python script that I do not maintain. I have modified the script to ignore the differences in language settings already.

    I would like to know if there is a way I could have removed all of the <w:lang w:eastAsia="zh-CN"/> settings from Microsoft Word.

    Andy

    Was this answer helpful?

    0 comments No comments