none
Repurpose underlin as is posible for bold in a sub RRS feed

  • Question

  • Hi,

    I'm currently developing macros that overloads the built in functions for bold italic subscript superscript... underline,

    to invoke my customizations I'm using sub like this

    Sub Bold()
    
         'my code for what I want to do
    
    End Sub


    and this works well for the toggle buttons but the underline gallery gives me a problem.

    I have tried both

    Sub UnderlineGallery()
        MsgBox "test 1"
      
    End Sub
    
    Sub Underline()
        MsgBox "test 2"
    End Sub


    but none of them gives me the msgBox that I'm expecting.

    What am I doing wrong?

    Or is there another way to do this? Can I write an procedure  that captures that interrupt/ button click more generally and that I then can check what type of button that was pressed?

    Also to note is that I would if possible like to avoid having to use the custom ui xml as I would like the macros to be compatible also with word 2011.

    Regards

    Erik

    Tuesday, August 6, 2013 2:12 PM

Answers

  • Hi Erik

    It's not possible, not even with Ribbon XML, to re-purpose a gallery control. Only "simple" commands can be re-purposed. You'd have to use Ribbon XML in WinWord, remove the built-in control and provide your own control(s). What you'd have to do for MacWord, I haven't a clue.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by ErikZk Thursday, August 8, 2013 7:59 AM
    Tuesday, August 6, 2013 3:40 PM
    Moderator

All replies

  • Hi Erik

    It's not possible, not even with Ribbon XML, to re-purpose a gallery control. Only "simple" commands can be re-purposed. You'd have to use Ribbon XML in WinWord, remove the built-in control and provide your own control(s). What you'd have to do for MacWord, I haven't a clue.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by ErikZk Thursday, August 8, 2013 7:59 AM
    Tuesday, August 6, 2013 3:40 PM
    Moderator
  • Erik,

    Regarding Word 2011 for the Mac I answered this question for you yesterday on the Word for the Mac community forum.


    Kind Regards, Rich ... http://greatcirclelearning.com


    Tuesday, August 6, 2013 11:20 PM
  • Richard

    Yes I saw that, although when making my post here I wasn't aware that my post had been split to become an almost duplicate.

    Your solution presented there still holds for finding the names of the subs even thou you need an english word to get language compatibility.

    Regards

    Erik

    Thursday, August 8, 2013 8:14 AM