Unable to save IRM protected powerpoint presentation RRS feed

  • Question

  • Hi guys, could you please advice me with the following problem:

    I have a presentation which has IRM protection applied to it.

    Have permission to open and edit presentation manualy and saving works fine,but when i try to do it throw C# it throws an exception  on save commad "Error HRESULT E_FAIL has been returned from a call to a COM component."

    Here is my code 

                string Location =path;
                Ppt.Application App = new Ppt.Application();
                App.DisplayAlerts = Microsoft.Office.Interop.PowerPoint.PpAlertLevel.ppAlertsNone;         
                App.AutomationSecurity = MsoAutomationSecurity.msoAutomationSecurityForceDisable;
                Ppt.Presentations objPresSet = App.Presentations;
               Ppt.Presentation objPres= objPresSet.Open(Location, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTri State.msoFalse);

                  objPres.SaveCopyAs(Location, Ppt.PpSaveAsFileType.ppSaveAsDefault, MsoTriState.msoTriStateToggle);
              catch (Exception e)

    any ideas ?


    Sunday, February 3, 2013 7:47 PM

All replies