it wont work for the scenario im trying to achieve, the code simply should cancel the default "Save As" dialog when you press "Save As" from the File menu with custom dialog, so the code works but after leaving the event with cancel flag set to true, the default "Save As" dialog appears. I just wanted to confirm if its a bug or something changed to the event behavior and there is another way to achieve what i want.
Thanks for posting in the MSDN Forum.
As far as I know the Cancel will block the save process. The presentation will not be saved. So when you close the PowerPoint a Save dialog will prompt to alert you save the changes. All is OK. This is the summary of the delegate: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.powerpoint.eapplication_presentationbeforesaveeventhandler.aspx
I hope it can help you.
Have a good day,
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
Thank you for your reply, i believe this is a bug in ppt for the following reasons:
1. The cancel flag cancels the save process and "save as" dialog, this is the behavior in ppt 2007.
2. If you registered this event and just wrote in the code
cancel=true or cancel=false
its the same result, no difference at all.
And here is the MSDN link for this event in 2007 which contains the same contents as the one you posted for 2010.
However, i solved the problem by triggering a timer to close "Save As" dialog window using P/Invoke.
- Edited by Yazeed Hamdan Friday, March 16, 2012 10:31 AM