assing macro to an an image, shape, text in Word 2007

L

Lev

I would like to run one of my macros when either an image, or a shape, or a
text is clicked in Word 2007 document.
Thanks,
 
S

Steve Schultz

In Word 2007 I have assigned a .JPG to a macrobutton in a .DOTM file like this:

{MACROBUTTON macroname .JPGimage}

This works fine in Word 2003, but in Word 2007 .DOTM file, double clicking on the image file does not work and the image is selected while the PICTURE TOOLS/FORMAT ribbon is displayed at the top of the screen. For some reason, the image file is not associated with the MACROBUTTON and macroname.

Any clue why this is not working in a Word 2007 .DOTM file?

Thanks,
Steve Schultz
 
J

Jay Freedman

You're correct. I hadn't gotten around to testing this in Word 2007, but it is
as you say. I suspect this is a side effect of the changes made in the program
code to make the context-sensitive tabs of the ribbon such as the Picture
Tools tab appear when needed. The behavior is the same in Word 2010.

It looks like the only way to get the picture-in-macrobutton function back in
Word 2007 or 2010 is to save the template in Word 97-2003 (*.dot) format or,
alternatively, to save each document based on the .dotm template as a Word
97-2003 (*.doc) document. Of course, that means you can't save anything in the
file that uses new features of the later versions (e.g., Smart Art), but
whether that's important is up to you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top