2008/7/17 Robin Jackson <[EMAIL PROTECTED]>:

> Paul, Harold Fuchs and Brian Barker,
> Very many thanks for your responses to my SOS call. Herewith answers
> to your questions
>
>
> Paul
>
> Unfortunately I've no idea how to access XML and probably wouldn't
> recognise any corruption there was.  Have tried to get to it via
> 'search'  and 'command prompt' but without success.
>
> Paul and Harold Fuchs
>
> The forum response reads:-
> First let's call our unopening ODT file as "bad.odt"
> 1.make backup FİRST -> " $ cp bad.odt bad_ original.odt"--a.  I have a
> backup on a memory                                              stick but
> get the same error                                            message
> when trying to open it
>
>                                   b.  COM does not recognise"$" as a
>                                                valid instruction.
> 2.  make new directory  ->" $ mkdir repair"
> 3. copy bad.odt to repair directory "$ cp bad.odt repair"
> 4. change default directory to repair → "$ cd repair"
> 5. unzip bad.odt ->" $ unzip bad.odt"
> 6. after unzipping you get bunch of filesand directoriy's under
> repair, find content.xml and open       it with your favourite text editor
> ->" $ kate content.xml"
> 7. use "find" function to find out, if you have XML tag
> "<office:automatic-styles>" (somewhere at the beginning pf document)
> and XML.tag "</office:automatic-styles>" (somewhere, middleof
> document) İf you have, then delete them and all databetween them.  Be
> sure, that you don't deletemore or less!
> 8. save content.xml (keep original name and place!)
> 9. zip extracted data back to one ODT document ->"$zip -r
> ./bad_repaired.odt./*"
> 10. try to open repaired document ->" $ ooffice ./bad repaired.odt"


> I stuck when Command Prompt wouldn't recognise '$'.
>


The person who sent those instructions was assuming you were running Unix or
Linux where the "$" is the prompt from the equivalent of the  Windows CMD
box you get when you do Start>Run>CMD - on Windows it would be something
like "C:\>". The stuff following the prompt is what you would type if you
were running Linux. Translating into "Windowsese":

1. Copy the file to bad_ original.odt - you say you already have a copy but
...
2. Make a new directory (folder) named "repair".
3. Copy the file to the new directory/folder.
4. CD to the new directory - or point Windows Explorer at it depending on
whether you are doing this via a Command Prompt or via Wiindows. From now on
you will be working within the "repair" folder.
5. In the "repair" directory use Winzip or equivalent to unpack the .odt
file into its component parts (an OpenOffice document is actually a sort of
ZIP file containing several other files); to do this on Windows, *right
click* the file, choose Open With and then choose Winzip as the program to
use. Make sure the little box labelled "Always use this program" is *not*
ticked/checked. If you don't have Winzip, there's a free program called
7-Zip from http://www.7-zip.org/ which I think will do the trick; otherwise
you may need to buy Winzip - worthwhile anyway in my humble opinion.
6. Within the unzipped files and directories, find a file named
"content.xml" and open it in a *text editor* like Wordpad.
7. Use the "find" function to find out if you have the XML tag
"<office:automatic-styles>" (somewhere at the beginning of the document) and
the XML.tag "</office:automatic-styles>" (somewhere in the middle of the
document). İf you have, then delete them and all the text between them.  Be
sure that you don't delete more or less.
8. Save the changed content.xml  Make sure to keep the original name and
*not* to let Wordpad add a ".txt" extension.
9. Still in the "repair" directory, use Winzip/7-zip to replace the old
content.xml with your new one within the .odt file. I think dragging the
file into the Winzip/7-zip window will cause the program to ask if you want
to overwrite the original - say "yes".
10. Try to open the repaired document with OpenOffice.

In any case, the content.xml file will contain all your text so, if the
above procedure doesn't work, you can recover it, albeit rather laboriously,
from that file and save it into a new document. Styles and formatting will
get lost during this process but that's probably a small price to pay. To do
this, open a new, blank, OpenOffice document and content.xml (in Wordpad or
whatever) in adjacent windows and then, piece by piece copy text from
content.xml and paste it into the new document. Make sure you avoid the "XML
tags" enclosed in < > brackets.


-- 
Harold Fuchs
London, England
Please reply *only* to [email protected]

Reply via email to