none
Unzipping and rezipping a PPTX file causes an error message with PowerPoint 2010 RRS feed

  • Question

  • I'm not sure this is the correct forum for this problem, but I can't find a better one.  My question isn't directly related to the SDK, but it is related to one of the Open XML formats.

    We have an application that processes files in Open XML formats (although it doesn't use the SDK) and we've recently received a bug report that some PPTX files processed by our application exhibit problems when opened in PowerPoint 2010.

    After some investigation, we've discovered that the problem can be reproduced without doing anything at all to the XML content.  Here are the steps we went through:

     

    • Create a new presentation in PowerPoint 2010 and go to Insert/Object.  Insert a "Microsoft Office PowerPoint 97-2003 Slide" object.
    • Save the presentation in PPTX format (e.g. "Presentation1.pptx")
    • Rename the file to "Presentation1.pptx.zip"
    • Right-click the file in Explorer and select "Extract All..."
    • Go to the folder where the files were extracted
    • Select All
    • Right-click on one of the files and select "Send To / Compressed (zipped) Folder"
    • Rename the resulting ZIP file to "Presentation1_repacked.pptx"
    • Open Presentation1_repacked.pptx in PowerPoint 2010
    • Double-click the embedded slide object

    At that point, I get an error message:

    "Microsoft PowerPoint can't start the application required to open this object. An error occurred and this feature is no longer functioning properly. Would you like to repair this feature now?".  Answering the question "Yes" kicks off the Office installer in "repair" mode but doesn't help with the problem.

    My environment is Windows Vista 32-bit with Office Professional Plus 2010.

    In trying to get to the bottom of this, we've discovered that the problem can be triggered simply by changing the "flags" field in the ZIP directory entry for the embedded object storage (ppt/embeddings/oleObject1.bin) from 6 to 0.  I don't get this; my understanding is that those bits are used simply to record the compression level used when the archive was created (6 means "super fast", 0 means "normal").

    Have we found a bug in PowerPoint, or have we misunderstood the Open Packaging Conventions somehow?

    Apologies if this is the wrong forum for this question (as I suspect it might be) but if anyone can point me in the right direction, that would be very much appreciated.

    Thanks in advance!

    Thursday, July 8, 2010 9:50 AM

All replies

  • Hi there,

    I don't know if it helps but I had similar problem. I took following steps:

    1. Create Excel xlsx file: file.xlsx
    2. Rename it to file.zip
    3. extract it
    4. zip back and rename to file.xlsx

    After this operation I couldn't open file.xlsx in Excel 2010 (I had the same error). So I came up with following proces:

    1. Create Excel xlsx file: file.xlsx
    2. Make a copy of this file: CopyFile.xlsx then rename it to CopyFile.zip
    3. extract it
    4. zip back and rename to CopyFile.xlsx
    5. Compare using fc file.xlsx with CopyFile.xlsx -> many differences!

    I think that this is due to Windows Zipper, why? Because I downloaded PeaZip and repeat all operation. Excel opened file without any problem and there were no differences between files! I don't know why maybe because of some character encoding?

     

    Thursday, July 8, 2010 10:09 AM
  • Bartłomiej,

    If you can't open the file at all in Excel, it's probably not the same problem.

    Are you sure you got the same error message I did?  I've had an error message from Excel when opening the file, but only when I accidentally added a top-level directory to the ZIP file.  When I did that, I got an error saying "Excel found unreadable content..."

    EM

    Friday, July 9, 2010 1:44 PM
  • Hello EM,

    Are you rezipping the files and folders as the same structure as the original zipped file? If you open the two zipped files and compare them, do you see any differences?

     

    Best regards,
    Ji Zhou - MSFT
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, July 14, 2010 9:51 AM
    Moderator
  • Ji,

    The structure of the ZIP files is identical before and after.  As I mentioned above, when I accidentally introduced a top-level directory into the ZIP file, the resulting file couldn't be opened at all.  The symptom I'm seeing is far more subtle than that.

    EM

    Wednesday, July 14, 2010 10:32 AM
  • When you unzip your file it creates a new folder in which all the unzip files are store. REZIP only the files..do not REZIP the folder in which the files are contain. That fixed my problem.
    Tuesday, August 10, 2010 7:04 PM
  • That wasn't the problem in my particular case - it actually appears to be due to a bug in PowerPoint 2010.
    Wednesday, August 11, 2010 7:46 AM