How to apply MacroButton to Graphic Instead of Text

What is the syntax in Word 2010 to attach a macro button to a graphic instead of text?

I've inserted a macro button as a field in the document which works correctly as:

{MACROBUTTON SomeMacroName MyText}

Instead of displaying 'My Text', I'd like to be displaying a built-in macro icon (such as one might attach to a QAT or custom macro in the ribbon) or to clip art or to a graphic stored on the network.

Who is Participating?
It's a long time since I actually did this, and I couldn't get it to work when I tried in response to your comment.

Googling has indicated that it only works with the pre-2007 formats (,doc & .dot). I saved the document as such and it now works

If is not acceptable, one alternative might be to use an ActiveX command button. This type of button has a picture property.
In that view, select all of 'MyText', then Insert a picture via the Insert tab.

Make sure that the text wrapping is set to 'in line' before using Alt+F9 to switch back to the field result view.
qengAuthor Commented:
Thx for responding Graham,

I'm able to insert the image as you suggest but it loses its association with the macro.  What I end up with is:

{MACROBUTTON SomeMacroName [picture here]}

Where [picture here] is say, a small red square or something i've chosen to use.

As an aside, I'm working off a Mac through a terminal session to a Windows machine so many of the keystroke combinations aren't readily accessible.  There are equivalents but I have other issues outside the scope of this post where my extended characters aren't being recognized.  This is a recent issue after years of use without trouble; separate problem.  So, I have to use the long way around instead of keyboard shortcuts.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

qengAuthor Commented:
Thx Graham,

I was able to get that working.  

Q.  What's the syntax to specify a built-in icon?

The only part i'm not sure about is how to specify an image which is built into Word, for example the type of small icon one can access when customizing the Ribbon or QAT.  My concern is that while I can specify an image on the network and get that to load, if someone who doesn't have permissions to that network share tries to use the file or the file is taken off the network, the image link associated with that ActiveX control will break.
I don't think that the office built-in ribbon icons can be accessed with VBA.
However an ActiveX picture is loaded on to the control, so goes with it. There is no risk of breaking a link.
qengAuthor Commented:
Thx Graham.  I was assuming the built-in ribbon icons could be referenced the same way as any image, given the image's URL (I'm just not sure where to find them) with the added benefit that I didn't need to create/resize images I know already exist on the system.

I'll work with your solution.

Thx for the help.
I had a dim memory that there was a rather complex process to get at the icons. I have found it here:
I note that there is an Export facility in the item list
qengAuthor Commented:
Thanks a bunch Graham.  By chance I had stumbled on that shortly after i'd posted my previous reply and had started using it.  

I can import the images from that Gallery by selecting them with the cursor.  That helps me expand the available images collection.

I'll need to do some more digging to figure out how to specify them by name in a vba macro.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.