Anyone who follows me on Facebook knows that recently I experienced a corrupted Microsoft PowerPoint file. I still don’t know what caused it, but the upshot was that a file that I worked on for an hour (and saved!) would no longer open after several different attempts.
Finally, in frustration, I set out to recreate it. As anyone who has had to recover something they created from scratch, one is left with the distinct impression that the second attempt will inevitably pale in comparison to the first, most brilliant, effort. So I was at some pains to recover whatever I could from the borked file. Thankfully, I knew exactly what I had to do.
Since I was working with a relatively recent version of Microsoft Office, and the file had the “.pptx” extension, I knew that really what I had wasn’t a single file with corrupted bits (and therefore likely irrecoverable), but instead a package of related files. Most people don’t likely know that MS Office files with the “x” extension are really a set of XML files and associated media (e.g., image) files, all zipped up together into one file.
Therefore, my first move was to drop the corrupted PowerPoint file on top of my “Stuffit Expander” utility (I’m on a Mac, so use whatever “unzip” utility you have), which created a folder with all of the constituent parts. The contents of the folder looked like this:
Then it simply became a matter of rooting around to find the bits I needed. In the /ppt/media folder I found the slide images I could then paste into a new presentation. Since they were saved in numeric order, it even preserved the order in which they appeared in the slide show. To recover the text on the slides, I simply needed to open up the XML files in the /ppt/slides folder and find the text bits among the XML markup. Again, since these files are saved in numeric order, the slide show order was preserved.
So although it was MS Office that somehow ruined my day, it was the fact that the “document” wasn’t really a document at all that ended up saving it. Microsoft: It’s a complicated relationship we have.