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.

Thx
qengAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
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.
0
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.
0
GrahamSkanRetiredCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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.
0
GrahamSkanRetiredCommented:
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.
0
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.
0
GrahamSkanRetiredCommented:
I had a dim memory that there was a rather complex process to get at the icons. I have found it here:
https://imagemso.codeplex.com/documentation
I note that there is an Export facility in the item list
0
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.