Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    WTKinRIC
    Guest

    Document Corruption

    I have a user copy and pasting info for several documents for a monthly report. These people use several other documents to create what they send to my user. All parties involved are using Word 97 at least SR1. The problem is some of these supporting documents corrupt the master document. There is no apparent problem with the document; the text and formatting is all intact, but you get a "This document may be corrupt" error. I have tracked down the corruption to certain users, but there is no apparent reason for why this is occuring. Does anyone have any idea, or has anyone seen this before??

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    My theory is...

    My theory (it is only a theory) is the defined (not actual) numbered lists in the document have grown to a huge number and there is no way in VBA to clear this metadata. This appears to be incremented every time a user visits the list gallery and copying and pasting large blocks of text adds the two files together etc. Over the life of text the number grows larger than you could imagine. I have seen around ~1,960 in documents that give that error message. You will discover that you can delete the entire content of the file and still have a huge number of lists in the metadata.

    The way I get rid of them is to save the document down into Word 95 format and then open it and save it in Word 95. Now you can bring it back without the extra metadata. Note: you must open the file with Word 95 as that is the crucial step.

    You can find out how many defined numbered lists are in the file by running the following code
    <pre>Sub ListCount()
    ' Dim listgal, i
    Dim sList As String
    sList = "Template Lists = " & ActiveDocument.AttachedTemplate.ListTemplates.coun t & vbCr
    sList = sList & "Document Lists = " & ActiveDocument.ListTemplates.count
    MsgBox sList
    End Sub</pre>

    If you can't lay your hands on a copy of Word95 let me know and I will describe a method for cleaning within Word97/2000.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    JCunningham
    Guest

    Re: Document Corruption

    I have to agree with Andrew. The only other time I have seen that error message was when I was coping multiple documents generated by Engineering into one composite document. The problem arose when I started coping numbered list. The only work around I found was down saving like Andrew suggested. The draw back was I lost a lot of formatting that had to be redone. YUCK!!! After enough nights recovering the document, I figured out that by switching the numbered list to normal before coping them to the composite document I avoided the error.

    Since I had a lot of copying to do, I created a little macro that changed the style to normal of the selected text (the numbered list), added a unique string at the end of each paragraph that told me if it was a roman or alpha list and what level. Then when I copied it, I ran another macro that set the correct attributes based on the string. The string was then deleted.

    The end result was that only the numbered lists in the composite document were ever used.

    Hope this helps
    Jay

  4. #4
    nehmar
    Guest

    Re: My theory is...

    Can you post your method for cleaning with Word 97/2000 anyway? I would be curious to see if it is what we are already doing.

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: My theory is...

    Its a method, not a macro - although it could be made into one. It works because of an oddity I have not yet discovered the key to. If I copy a large chuck of the problem file into a new file then the metadata lists come also. If I copy each part of the document in small enough chunks then the metadata lists get left behind. The problem is "Small enough" chunks defy definition. It can be as large as 10+ pages or as small as 2-3 pages. The only way to know is to paste a chunk and do a list count by running the earlier macro.

    In Word97/2000 to remove the spurious lists I have:
    1. Open the problem file (call it F1) and a new blank file based on the same template (call it F2)
    2. Check the list count in F2 and make sure it is low or zero. If not you have to start with a new blank file and attach the template and update the styles.
    3. Copy pages 1-5 from F1 into F2
    4. Run the macro and check the list count hasn't shot up.
    5A. If the list count is low - Save F2 and repeat step 3 on the next chunk.
    5B. If the list count is high - Close F2 without saving, reopen the F2 and try step 3 with a smaller chunk.

    When you get impatient and start taking bigger and bigger chunks you will fall into step 5B. I couldn't be bothered making a macro to do this although it probably wouldnt be too hard. I run both Word95 and Word97 for problems exactly like this and that is easier for me.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: My theory is...

    Hi Andrew:
    While I don't know the key either, I have noticed that Word responds differently with large chunks of text as oppossed to small chunks. For example, if your trying to delete unused standard styles from a document, you can do so by copying small chunks of text to a new document. Copying large chunks copies the unused styles also. See KB article http://support.microsoft.com/support/kb/ar...s/Q193/5/36.ASP

  7. #7
    WTKinRIC
    Guest

    Re: My theory is...

    Aside from the unavoidable loss of formatting(tables mostly) this has been an excellent solution! Thanks for your help!!!!

  8. #8
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: My theory is...

    Thanks Phil

    Interestinger and interestinger. Microsoft come through with a biological answer to a digital question (APPROXIMATELY 50 paragraphs). They hire anyone these days don't they.

    A similar methodology to Method 2 could be applied to remove the extra lists too I suspect. Definitely worth further investigation.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  9. #9
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    140
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: My theory is...

    One way to help to avoid trouble is to skip the last paragraph when copying the whole content from a doubious document to a fresh one. And, clearing/reducing the metadata seems a good idea to me, although I did not see an MSKB article relating it to file corruption.

    WD97: How to Minimize Metadata in Microsoft Word Documents

    http://support.microsoft.com/support/kb/ar...s/Q223/7/90.ASP

    WD2000: How to Minimize Metadata in Microsoft Word Documents
    http://support.microsoft.com/support/kb/ar...s/Q237/3/61.ASP

  10. #10
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    378
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: My theory is...

    Hi

    I've noticed this thread a bit late in the piece, so my apologies if this has been covered before.

    I've noticed similar things when copying-and-pasting into a new document:

  11. #11
    Star Lounger
    Join Date
    Jan 2001
    Location
    Upstate NY, New York, USA
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Corruption

    We've found through very painful experiences that one thing that causes a lot of files to become (or appear to be) corrupt is the existence of lots of temp files. This too only happens with certain users (and certain user's PCs). Just recently I found one user who had almost 2,000 tmp files in their windows directory and all documents were corrupting. Once those were deleted, everything was okay. I have put a line in the autoexec.bat that reads "del c:windowstemp*.tmp"

    Just my two cents... HTH [img]/w3timages/icons/smile.gif[/img]

  12. #12
    WTKinRIC
    Guest

    Re: Document Corruption

    This was one of the first things I looked at, thanks. Andrew's method of saving back and then saving it forward did the trick {)

  13. #13
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Document Corruption

    "There are two kinds of Master Documents. Those that are corrupt and those that soon will be Corrupt."
    http://www.mvps.org/word/FAQs/General/WhyM...DocsCorrupt.htm
    http://www.mvps.org/word/FAQs/Genera...MasterDocs.htm

    You may also want to look at the following for links to work-arounds:
    http://www.addbalance.com/word/masterdocuments.htm

    Hope this helps.
    Charles Kyle Kenyon
    Madison, Wisconsin

  14. #14
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Document Corruption

    [img]/w3timages/icons/doh.gif[/img]Oops! I left out the following link which may address your document corruption attempts if they are caused by something other than use of Master Documents:
    http://www.addbalance.com/usersguide/document corruption.htm
    Charles Kyle Kenyon
    Madison, Wisconsin

  15. #15
    WTKinRIC
    Guest

    Re: Document Corruption

    I found this very useful.. thanks for the help!

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •