none
In Office 2010, vsto, what event fires after Save As finishes RRS feed

  • Question

  • In vsto, office 2010, I am looking at "Save As" (not "Save"). Is there an event that fires after "Save As" has completed? I am looking for something that is the opposite of "DocumentBeforeSave"
    Friday, September 7, 2012 7:01 PM

Answers

  • No, there is no such event.

    The workaround, assuming you're doing this from within a VSTO AddIn, is to cancel the save from within your BeforeSave handler, and then enact the save with your own custom code.

    See this thread for sample code.

    Edit: I'm just talking about Word. Actually, in some applications there is an AfterSave event. Check the MSDN documentation.
    • Edited by JosephFox Friday, September 7, 2012 11:10 PM
    • Proposed as answer by Gopra Saturday, September 8, 2012 6:09 PM
    • Marked as answer by Zoldello Sunday, September 9, 2012 10:51 PM
    Friday, September 7, 2012 11:03 PM

All replies

  • No, there is no such event.

    The workaround, assuming you're doing this from within a VSTO AddIn, is to cancel the save from within your BeforeSave handler, and then enact the save with your own custom code.

    See this thread for sample code.

    Edit: I'm just talking about Word. Actually, in some applications there is an AfterSave event. Check the MSDN documentation.
    • Edited by JosephFox Friday, September 7, 2012 11:10 PM
    • Proposed as answer by Gopra Saturday, September 8, 2012 6:09 PM
    • Marked as answer by Zoldello Sunday, September 9, 2012 10:51 PM
    Friday, September 7, 2012 11:03 PM
  • This is what you get when you have poor communication between teams. Now there is a cool functionality in Excel and PowerPoint but not in Word. Bummer!
    Monday, September 10, 2012 4:18 PM
  • Yeah. I don't know if they had a good reason or not. I feel that since they call it 'BeforeSave', they must have at least considered an AfterSave event. But, if it wasn't simply poor communication between teams, I can't imagine what the reason was.
    Monday, September 10, 2012 4:35 PM
  • Do you know of any workaround to get the AfterSave functionality working in Word?
    • Edited by Zoldello Wednesday, September 12, 2012 5:52 PM
    Wednesday, September 12, 2012 5:51 PM
  • Yes, as I posted above. To summarize: if, during the 'BeforeSave' event you save with your own code, then afterwards you can run other code (make sure to cancel the original save afterwards).
    Wednesday, September 12, 2012 10:09 PM