none
repurposing: doing somenthing before or after original command. RRS feed

  • Question

  • hi,

       If I write in my XML 

     <command idMso= "someIdMso" onAction="my_someIdMso_onAction" />
    

    and in my VBA

    Sub my_someIdMso_onAction(control As IRibbonControl, ByRef cancelDefault)
      MsgBox "before"
      cancelDefault = False
    End Sub
    
    

    I can repurpuse a built in command and let the procedure do something before the original command action is executed.

    I thought that was enough to do the following

    Sub my_someIdmso_onAction(control As IRibbonControl, ByRef cancelDefault)
      cancelDefault = False
      MsgBox "After"
    End Sub
    

    to execute the original action and then my own.

    But is not the case. My code is called always before the original action. Why? How can I do to let Word execute normally its action and then do my own?

    thanks, Lauro

     

     

    Saturday, May 28, 2011 6:54 PM

Answers

All replies