none
Cancel Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType... RRS feed

  • Question

  • Hello,

    I have written an addin that converts the currently open presentation into a .wmv and it works perfectly.

    As the presentation is converting the user can see a progress bar at the bottom of the PP video and a red X to cancel if they want to do so.

    The user has requested that there is a Cancel button on the windows form that awaits the completion of the conversion.

    Is it possible to cancel the

    ppApplication.ActivePresentation.SaveAs(String.Format(exportPath, exportName), Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsWMV);

    process and if so, can someone give me some pointers on how to do it please?

    Many thanks

    Trevor

    Wednesday, August 7, 2013 10:49 AM

Answers

All replies

  • Hi Trevor,

    There is a Application_PresentationBeforeSave event where you can block a save event.


    Kind Regards, Rich ... http://greatcirclelearning.com

    Wednesday, August 7, 2013 12:26 PM
  • Hi Rich,

    When you say "block" do you mean stop it running?

    The user has requested a cancel button on the form that basically mimics the red cancel X that is at the bottom of the screen.

    They want to be able to cancel it while the conversion is in progress.

    Trev

    Wednesday, August 7, 2013 12:31 PM
  • Hi Trev,

    Oh, I'm sorry I misunderstood.

    Canceling something that's in process will have to be done from a system level I imagine.

    I've never done it so I don't have a good answer.


    Kind Regards, Rich ... http://greatcirclelearning.com

    Wednesday, August 7, 2013 1:01 PM
  • Hi Trevor,

    I don't think it is possible. To do this, you need to abort the "SaveAs" thread in "POWERPNT" process. As far as I know, we are not able to do this from the current API.


    Jeffrey Chen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Thursday, August 8, 2013 7:32 AM
    Moderator
  • Hi Jeffrey,

    Thanks for taking the time to look at this.

    Trev

    Thursday, August 8, 2013 8:35 AM