none
PresentationDocument.Open() throws on simple odp saved from PPT 2007 RRS feed

  • Question

  • Just got started using Open XML Software Development Kit 2.0. Saved a single slide ODP from PPT 2007. Trying to open it with PresentationDocument.Open() throws this (any ideas?)

    Message:
    The specified package is invalid. The main part is missing.

    Stack Trace:
    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.Load()
    at DocumentFormat.OpenXml.Packaging.OpenXmlPackage.OpenCore(String path, Boolean readWriteMode)
    at DocumentFormat.OpenXml.Packaging.PresentationDocument.Open(String path, Boolean isEditable, OpenSettings openSettings)
    at DocumentFormat.OpenXml.Packaging.PresentationDocument.Open(String path, Boolean isEditable)
    Friday, January 1, 2010 7:23 PM

All replies

  • Hello Bjorn,


    This usually means that the Presentation document is corrupted. If we open the document directly from PowerPoint application, do we see the same error?

    And what codes we run before we save the document? Could you please show us the codes? I'd like to reproduce the issue in my side so that I can do further investigation and help on this.

    Best regards,
     

    Ji Zhou

    MSDN Subscriber Support in Forum

    If you have any feedback on 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.
    Monday, January 4, 2010 8:10 AM
    Moderator
  • Hi Ji,
    File opens just fine in in PPT.
    Uploaded a mini-project to http:\\www.backspintwister.com\bugreports\OdpOpenIssue.zip
    Best,
    ---bjorn
    Monday, January 4, 2010 9:37 PM
  • Hi Bjorn,

    i checked the attached files. The .odp file is in ODF format (I guess), which is supported by PPT2007, but it's not in Open XML file format which is the only file format standard that Open XML SDK support. This is why Open XML SDK threw exception when opening.
    Tuesday, January 5, 2010 1:57 AM
  • Hi,
    Sorry for wasting your time. Using a .pptx file solved the issue. I was confusing the Open XML format with the OpenDocument format.
    ---bjorn
    Tuesday, January 5, 2010 1:32 PM