Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Fix Documents

Brandon Desjarlais edited this page Jun 17, 2021 · 5 revisions

This button is displayed for files that aren't necessarily corrupt from an xml tag structure perspective. These are for files that have valid xml, but they are marked up in a way that in most cases, is not valid for the file format. There are a few known scenarios that have been added to this feature and can be used to try correcting a file.

Fix Bookmarks

Definition:

There are times when the start or end tag is missing. When a bookmark is created, it should have a model such as this. <w:bookmarkStart w:id="0" w:name="testing123"/> <w:r> <w:t>This is sentence two.</w:t> </w:r> </w:p> <w:p> <w:r> <w:t xml:space="preserve">This </w:t> </w:r> <w:bookmarkEnd w:id="0"/>

Fix:

The fix here is to create two lists, one of start tags and one with end tags. Then essentially go through each start tag and see if the end tag has the same id number. When an orphaned bookmark tag is found, simply delete it. We could try adding it back but I’m not sure how to know where the tag is “supposed” to be, so I’m deleting it instead.

Endnotes

Definition:

There are times when endnotes get inflated with duplicate content. So there would be an endnote with the same line repeated 1000+ times. So it would be “ENDNOTETEXT ENDNOTETEXT ENDNOTETEXT, etc.”.

Fix:

If there are more than 1000 runs of content in a single endnote this will keep the first endnote paragraph and delete the rest.

List Templates

Definition:

Whenever you apply a bullet or list style, a List Template is created. This means that a bullet style is added to the numbering.xml file, which is where the formatting of the bulleted list is stored. The numbering.xml file also contains a list of id values that are used in the document.xml to reference the corresponding bullet style in numbering.xml.
One part of the problem comes when you delete that bulleted list. The style definitions in numbering.xml do not get deleted. This behavior has been like this in Word for a very long time. So, the file can get bloated, which isn’t necessarily that much of a problem from a file size perspective. It is a problem though if you continue to add bullet type styles in the file. There is a limit of 2047 active lists in a document and any that are defined beyond that, will not get rendered in the document.

Fix:

The fix here is to go through and try to find 1 single and 1 multi-level bullet from the list template list. Then go through the document and apply one of those to each bullet used which should get the document under the count limitation in the document.

Revisions

Definition:

Fix:

Table Grid

Definition:

Fix:

Comments

Definition:

Fix:

Hyperlinks

Definition:

Fix:

CoAuth Hyperlinks

Definition:

Fix:

Clone this wiki locally