none
'Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType' doesn't contains definition for 'ppSaveAsWMV' RRS feed

  • Question

  • Dear all,

    I face to a strange problem when I try to save a powerpoint to WMV file in C#:

    'Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType' doesn't contains definition for 'ppSaveAsWMV'

    In Visual Studio, the completion proposes 'ppSaveAsWMV' in the enum, but the compilation failed.

    In add, when I try with anoter PpSaveAsFileType (as pdf or rtf), it's working fine.

    Does anyone have a clue?

    Thanks in advance for your support or idea !

    Friday, November 22, 2013 6:32 PM

Answers

  • Hello Awena,

    It is a well-known issue for newbie Office developers. First, pay a special attention to the PpSaveAsFileType enumeration that corresponds to PowerPoint 2007. As you may see, there is no 'ppSaveAsWMV' value in the enum. This confirms my assumption that you use Primary Interop Assemblies (PIA) belonging to the newer version of PowerPoint (which contains the required value). What PowerPoint version do you have installed on the dev PC?

    Anyway, please make sure that PIA's version corresponds to PowerPoint on your PC. The IntelliSense system of Visual Studio is based on the PIA's data. That is why you see the 'ppSaveAsWMV' value in the list of possible completion.

    • Proposed as answer by Eugene Astafiev Saturday, November 23, 2013 6:26 PM
    • Marked as answer by AwenaB Monday, November 25, 2013 12:35 PM
    Saturday, November 23, 2013 6:26 PM

All replies

  • Hello Awena,

    It is a well-known issue for newbie Office developers. First, pay a special attention to the PpSaveAsFileType enumeration that corresponds to PowerPoint 2007. As you may see, there is no 'ppSaveAsWMV' value in the enum. This confirms my assumption that you use Primary Interop Assemblies (PIA) belonging to the newer version of PowerPoint (which contains the required value). What PowerPoint version do you have installed on the dev PC?

    Anyway, please make sure that PIA's version corresponds to PowerPoint on your PC. The IntelliSense system of Visual Studio is based on the PIA's data. That is why you see the 'ppSaveAsWMV' value in the list of possible completion.

    • Proposed as answer by Eugene Astafiev Saturday, November 23, 2013 6:26 PM
    • Marked as answer by AwenaB Monday, November 25, 2013 12:35 PM
    Saturday, November 23, 2013 6:26 PM
  • Hello Eugene,

    I used the Version 12.0.0.0 instead of the 14.0.0.0... It's working better now !

    Many thanks for your support,

    Awena

    Monday, November 25, 2013 12:35 PM