Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    174
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add A Macro Button to Word Document (Word 2000)

    Is it possible to add a button on a word document (just draw a shape or put a pict), then assign a macro to that button (as one can in Excel) ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add A Macro Button to Word Document (Word 2000)

    Word doesn't have a command button in the Forms toolbar (as in Excel), but the Control Toolbox does offer a command button. It works like the command button from the Control Toolbox in Excel.

    Right click any toolbar and select the Control Toolbox. It contains several controls you can put in a document; one of them is a command button. If you put one in your document, you are switched to design mode automatically. The first button on the Control Toolbox toggles design mode on and off, and there is also a separate single-button Exit Design Mode toolbar. While in design mode, you can:
    <UL><LI>Right-click the command button and select CommandButton Object > Edit to edit the caption
    <LI>Double click the command button (or right click and select View code, or click View code on the Control Toolbox) to edit the OnClick event. You can either write code here, or just enter the name of a macro to be executed.
    <LI>Edit the properties of the command button (right click and select Properties, or click the Properties button on the Control Toolbox).[/list]HTH

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add A Macro Button to Word Document (Word 2000)

    And one more way to do it would be to use a macrobutton field. The syntax is

    { macrobutton MacroName DisplayTextOrPicture }

    The curly braces are inserted by pressing Ctrl+F9. When you double click the field, be it text or a picture, the macro will run.
    Cheers,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •