Visual Studio Developer Center > Visual Studio Forums > Visual Studio Tools for Office > to modify ShortcutText of a commandbar button in new menu
Ask a questionAsk a question
 

Answerto modify ShortcutText of a commandbar button in new menu

  • Monday, November 02, 2009 12:44 PMVema Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    While trying to change the ShortcutText of a commandbar button in new menu of outlook, getting some com exception as "HRESULT E_FAIL " DURING COM CALL.

    How to modify the Shortcut text?

Answers

  • Wednesday, November 04, 2009 6:48 AMBessie ZhaoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    It seems that you are changing Short Cut of built-in button. I guess it throws the error "Error HRESULT E_FAIL has been returned from a call to a COM component." when setting ShortcutText property. As far as I know, we cannot modify the built-in button's short cut. Here are some threads about Excel short cut: CommandBarButton's Shortcut and Enabled/Disabled. If I have mistaken this scenario, please point me out.

    Best regards,
    Bessie

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

All Replies

  • Wednesday, November 04, 2009 6:48 AMBessie ZhaoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello,

    It seems that you are changing Short Cut of built-in button. I guess it throws the error "Error HRESULT E_FAIL has been returned from a call to a COM component." when setting ShortcutText property. As far as I know, we cannot modify the built-in button's short cut. Here are some threads about Excel short cut: CommandBarButton's Shortcut and Enabled/Disabled. If I have mistaken this scenario, please point me out.

    Best regards,
    Bessie

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.