Jean-Guy
Fri Feb 02 09:50:45 CST 2007
plh was telling us:
plh nous racontait que :
> Hi all,
> I am new to Word VBA but have extensive experience with it in Excel
> and Access. I am sure this is simple: I need to put a control on the
> document, as opposed to the user's tool bar, and then give it a click
> or double click event, in order to start things rolling. Ideally I
> would want a command button but that does not seem to be an option,
> at least, I don't see it. What is the best way to proceed? Thanx,
> -plh
You could use a macro button field:
Do CTRL-F9 to insert a pair of field delimiters: {}
Then type something like this between the delimiters:
{MACROBUTTON name_of_your_macro Text to be displayed in document}
Finally, with the field selected, do SHIFT-F9 to toggle between field code
and field values.
The user need to double-click on the MacroButton field to launch the macro.
You could use an ActiveX button (from the Control Toolbox toolbar), but if
you plan on distributing your work, you may run in all kinds of problems
with macro security (ActiveX controls are blocked by the security system).
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site:
http://www.word.mvps.org