So I began to ask Du Niang, and found that someone had a similar situation. For example, the following article has been solved by many people, but I still dare not try.
1. The main idea is to modify. Docx files are compressed into a file compression package with a suffix. rar/。 Zip, then unzip, modify the document.xml file in the word folder, and then replace the document.xml file in the compressed package with the modified file. The way of analyzing the document.xml document with "firstobjectXML Editor" introduced in the above connection may be applicable when dealing with the situation of missing tags and mismatching tags, but when I analyzed the document, I didn't report an error, and I was almost crying in the face of all the codes I couldn't understand.
2. So I continued to spend money with my mother, and there was no result. In desperation, I thought of the Microsoft community. I think it is Microsoft's own business. There should be a solution. As a result, I really found an English article:
/en-us/ms office/forum/ms office _ word-MSO _ other/cant-open-word-file-due-to-undeclared-prefix/a 7 C3 b 29 a-da52-4d3e-bc4f-ca7e 1e 077 1 F4
Although the problem of this article is "the sentence is not prefixed", it is very close to my problem, so I studied it carefully and got my solution.
1) First, change the suffix of the docx document to. rar/。 Zip, unzip, find the document.xml in the word folder and open it with Notepad++. If not, you can install this code editor software first.
2) Open XML validator, which is actually a code validator. Open the web address: /xml/xml_validator.asp, or/,without pro test. Find the "Syntax Check Your XML" input window.
3) Select all (ctrl+a) in Notepad++Copy all the contents in (CTRL+C)CTRL+C)document. XML, then go to 2), paste and replace the contents in the original input window, and then click Verify. After a while, the analysis results will appear. The following is my analysis result:
Note: Because xml code can be very large, all windows may get stuck. Just wait patiently, the same below.
4) After the positioning error, it can be solved. My mistake was: In line 470, "xmlns: CX" was defined repeatedly. So I went back to notepad++, and ctrl+F searched for "xmlns: CX", and found that the same tag prefix was defined three times. I don't know why this problem occurs. Therefore, the repeated definitions have been deleted. (If this step is not easy to operate in notepad++, you can copy the code into the word document to find the error. )
5) Save the modified xml document, find the compressed package in 1), click the compressed package to find the document.xml under the word folder, right-click to delete the file, and then right-click to add the file to the compressed package to add the modified document.xml compressed file. Finally, change. rar/。 Zip suffix returns to. Docx suffix, open the file and continue to report errors. It says "File is damaged", click OK, and then word will ask you if you want to restore the document. Just click Restore.
Generally, the template file of word is damaged, the version of word is incompatible, and the file is damaged. , and can be restored by deleting the template file of word.