Assign mmacro to object

S

sgdgr

Hi NG!

In Excel its very easy to assign a macro to an obejct (like a picture) in a
spreadsheet. How can I assign a macro to an obejct in a document.

Jan
 
J

Jonathan West

Hi Jan,

In Word this is done by inserting a MACROBUTTON field. There are details on
this feld within the Help files in Word.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
C

Cindy Meister -WordMVP-

Hi Sgdgr,
In Excel its very easy to assign a macro to an obejct (like a picture) in a
spreadsheet. How can I assign a macro to an obejct in a document.
Put very simply, you cannot. Word does not have this facility.

What Word does have, though, it the MACROBUTTON field. Look that up in Word's
Help files to get a start on it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

Digital Services

Hi Jan,

It can be done quite easily.

From the Control Toolbox on the Visual Basic Toolbar in Word, you can use an
Image control or Command Button control in your document, then change the
Picture property to your choice. In the click event for either control you
can write your code.

Steve
 

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