MSWord VSTO button functionality
Posted on 2006-10-27
I have created a new button which I added to the toolbar in MSWord with C#. Now the functionality I want to give that button is when someone clicks the button I created it will act as if they clicked save and then act as if they had clicked the open button on the toolbar how do I do this?
void OnClick_Button(Office.CommandBarButton ctrl, ref bool cancel)
//what can I put to get same effect as the save button being hit
//I've tried calling event handlers directly but it hasn't given me the same effect as hitting the button.
//I've tried calling wordApplication.activeDocument.Save() but it produces the error "command failed" and gives no other description