Corrupted Open Office document (.doc format)

Hi,

I am using Zotero 1.0.7 with Open Office 2.3.0 in OpenSUSE 10.3. I just finished creating a rather long document with writer, which contained a number of references (as well as equations with the Math function). It was saved as a .doc file, repeatedly, with no problems. Citations were inserted as reference marks.

I was getting to the end of editing it, and wanted to change my refresh my citations. I hit the refresh button on the Zotero tool, and it hung OO. This has happened before (usually when inserting citations), and I fix it by killing OO and restarting.

This time was different, however. When I tried to restart OO, it gave me the usual document recovery process, but this process failed, prompting another recovery process to start, which then failed again. I rebooted the computer. Same problem.

I then cancelled the recovery, and tried to open the document. Failure. I managed to open other Writer documents, but I would then get the "error loading basic of document..." message, even though the document opened.

I ultimately fixed the Error messages by uninstalling and reinstalling the OO plugin and Zotero. However, I cannot open those documents in Open Office. I moved them to my Windoze machine, and the document opens in Word, but now my equations are all screwed up, and I have to redo the citations (because they weren't saved as bookmarks).

Anyone now how to fix this document, and what might be causing it to fail?

Thanks.
  • edited August 2, 2008
    I don't really know, but I'd be leery myself of using .doc as default save format in OOo. I recall lots of stories of corrupt documents even in Word.
  • Not my first choice either, but had to share it with an MS-only colleague, hence the .doc save.
  • Even when you will be sharing a file with someone who uses Word, it's still a good idea to keep the file in ODT format while you are working on it, and then save it in the DOC format once you are ready to send it to the other person. That way, all of the conversion is done at once, rather than progressively as you edit, and you will have an ODT "source file" in case there are any conversion anomalies. You can also make a PDF from the "source file," which will preserve any layout that might not be preserved when the OOo DOC file is opened in Word, such as pagination changes that can occur due to differences in the fonts installed on the different systems.

    If you happen to share files by email, there's a way to make the save-as-DOC process a lot easier. OOo has an "E-mail as Microsoft Word" command under File -> Send. If you have told OOo which email client you use (in Tools -> Options -> Internet -> E-mail), then that Send command should open new message in you email client with the OOo file included as an attachment in DOC format, all in one step. If you end up using that a lot, you can add a toolbar button for the command. There's a command for emailing as PDF, too.
  • I was going to suggest the following for trying to repair corrupted ODTs:
    http://user.services.openoffice.org/en/forum/viewtopic.php?f=7&t=1532
    It basically involves unzipping a copy of the corrupted file and editing content.xml.

    But then I remembered that all you have is a DOC file, which is binary and can't be unzipped like that.

    Have you ever turned on automatic backup in OOo (Tools -> Options -> Load/Save -> Always create backup copy)? The backups are saved in ~/.openoffice.org2/user/backup with the .bak extension. But I just did an experiment with a DOC file, and I discovered that when I renamed the .bak file to .odt, OOo opened it just fine, as if it were in ODT format originally.

    So, if you have a backup copy of the file, you could try renaming it and then, if it still won't open, you could try the recovery method for ODTs above.
  • Hi,

    Thanks for the suggestions. Unfortunately, no joy on those. I didn't have automatic back-up enabled, so that didn't work out. Changing the .doc extension to .odt didn't help either, I am afraid (same crash).

    Fortunately, I salvaged the document in Word.

    Tried the fix posted at that link, but I got the following:

    Archive: bad_back.odt
    End-of-central-directory signature not found. Either this file is not
    a zipfile, or it constitutes one disk of a multi-part archive. In the
    latter case the central directory and zipfile comment will be found on
    the last disk(s) of this archive.
    unzip: cannot find zipfile directory in one of bad_back.odt or
    bad_back.odt.zip, and cannot find bad_back.odt.ZIP, period.

    Did I have to zip it first? I didn't get that from the instructions, but perhaps there was something else I didn't see.

    Thanks!
  • edited August 3, 2008
    The instructions in the link apply only to real ODT files, not DOCs (even when renamed to ODT). It's not possible to convert a DOC, in a binary format, to an ODT, which is principally a textual format, by renaming.

    The renaming was only for the backup files saved by OOo, the ones with the .bak extension. And upon further investigation, it seems that what I proposed was not correct. That is, the backup files created by OOo automatic backups are in the format of the file, so backups of DOC files are DOCs and not ODTs. Which makes more sense, in fact. Renaming to ODt would not have worked even if you had enabled the OOo backups.

    Anyway, it looks to me like this is probably going to be one of those learning experiences for you, unfortunately.
  • Yes, it is. Fortunately the MS option works to salvage most of it. Would be nice if more people started to adopt OO so that the conversion wasn't necessary!
Sign In or Register to comment.