Results 1 to 7 of 7
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    open doc - get a msg doc is corrupt but it isnt (Word97 sr2a)

    hiya
    user has a word file.
    each time user opens file the following message appears:
    'This document may be corrupt. To preseve the contents:
    Choose Select All from the Edit menu, then choose Copy from the Edit menu. Create a new document, then choose Paste from the Edit menu' OK
    clicks OK & works with the doc file as per usual.

    The doc is approx 110pges long - size 950K.
    Standard text in doc with some tables.
    The only thing that is a little different is excel data has been imported into the word doc & inserted as a word table & there a two graphic objects.
    The doc has never crashed.

    I have selected all text except last paragraph mark & copied into new doc >save new doc & then re-opened - when I re-open the new doc the message still re-appears.
    any ideas? thanks in advance Diana

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

    Re: open doc - get a msg doc is corrupt but it isnt (Word97 sr2a)

    Hi Diana:
    Try to isolate the problem. I'd copy text up to, but not including the table or graphic. Then save & open the new document. Then add the table or graphic, one at a time. After each one, save, & close. Then reopen. You might find that you have a corrupt table or graphic.

    If so, you can copy the rest. If it's a table that's corrupt, convert it to text in a separate document. Then change it back to a table & see if that fixes the problem.

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: open doc - get a msg doc is corrupt but it isnt (Word97 sr2a)

    Diana,

    Based on the document you describe, it is most likely a problem with a table. But here's another thing that can trigger that message: go to the VB Editor (Alt+F11) and show the Immediate Window (Ctrl+G) if is isn't already showing. In the Immediate Window type:

    ?ActiveDocument.ListTemplates.Count

    and press Enter.

    If the number you get is higher than 1400 (give or take), then the number of list templates in the document could be triggering that message. There is no quick and easy way to get rid of excess list templates in Word 97, but if you have access to Word 2002, just opening the document, saving and closing it will get rid of most of the excess list templates.

    Gary

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: open doc - get a msg doc is corrupt but it isnt (Word97 sr2a)

    Gary - thankyou for those tips - that worked ie opening up doc in XP removed error message - again thanks - Diana

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: open doc - get a msg doc is corrupt but it isnt (Word97 sr2a)

    Hi Diana,

    Glad that worked. Subsequent to this thread, I learned of a way to make Word 2000 delete the extra list templates - see <post#=140440>post 140440</post#>.
    And just today, I've learned from Hans V. that this can be made to work in Word 97 as well - see WD97: Error Message: "This Document May Be Corrupt" After Switching Between Bullet and Number List Format .

    Gary

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: open doc - get a msg doc is corrupt but it isnt (Word97 sr2a)

    HI Gary - thanks for that again.
    also
    I'm interested in the tips re code ie Immediate window & type code in etc
    Previously where I worked, there was a team of developers & they showed me how to use this sort of code
    now working solo - since then I havent used that code & I have forgotten.

    Are there any books you could recommend that has this type of code tip info in there
    or any websites you can point me to?
    many thanks Diana

  7. #7
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: open doc - get a msg doc is corrupt but it isnt (Word97 sr2a)

    Hi Diana,

    Re using code in the Immediate window, there are two main things you can do:

    You can return (get) a property by using syntax like that in the previous post:

    ?ActiveDocument.ListTemplates.Count
    and then Enter.
    (the question mark is a shortcut for "Print" btw)

    To set a property (property let for purists), just type the statement as you would in a regular code module, eg.:
    Selection.Font.Size = 12
    and then Enter.

    Everyone has their list of suggested VBA books. Some of my favorites:

    VB&VBA in a Nutshell - Paul Lomax/O'Reilly Press
    Learning Word Programming - Steven Roman/O'Reilly Press

    Two of the best general Office VBA books are:
    Office 97 Visual Basic Programmer's Guide and
    Office 2000 Visual Basic Programmer's Guide
    - both published by Microsoft Press. The former book is a good overview for beginners, the latter book is for advanced users and goes into great detail.
    These latter two books may no longer be in print, but probably can be found used. Additionally, the Office 2000 book is available for free online at the MSDN site here.
    There are no doubt some more good ones but the above are a great start.

    Gary

Posting Permissions

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