Results 1 to 8 of 8

Thread: [RESOLVED] {Word} Run Toolbar buttons

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2001
    Location
    Tucson, AZ
    Posts
    2,166

    Resolved [RESOLVED] {Word} Run Toolbar buttons

    This post has be corrected to explain the correct "howto"

    First attempt at trying to create objects in Word that link to VBA Code.
    I basically don't understand where Word Object events are exposed so I can write code for these events. (so far no events for objects appear in the VBA editor).
    Using Office 97 (I know its old).

    This is what I've done:

    A) Create the required VBA code.
    a) Created a module in the VBA editor and added the procedures I want to execute.
    b) Saved this module and exited the VBA editor.

    B) Created a blank "Customized" toolbar in Word by:
    a) Tools Menu
    b) - Customize
    c) - Tab Toolbars
    d) - New
    e) - Entered name and saved
    f) -Right clicked toolbar and changed default name.

    C) Add Buttons (Command) to the toolbar {This is wrong, see C1 below}
    (Maybe these should be toolbar buttons, not command object
    If so, where do I find them??)
    a) Tools Menu
    b) - Customize
    c) - Tab Commands
    d) From Categories List selected Control Toolbox
    e) - From Command List drag Dropped Command Button onto Toolbar

    C1) To Place a Button on toolbar which executes VBA Code (Macro)
    when pushed.
    (VBA Procedure must already exist -- at least as a stub)
    a) Tools Menu
    b) - Customize
    c) - Tab Commands
    d) From Categories List select "Macros"
    e) - From Command List drag "Macro Name" onto Toolbar
    This creates the button
    f) - Right click button and then Edit Macro name to desired button name.

    D) A VBA procedure (macro) can also be created to toggle the toolbar.
    As in C1 drag the macro for toggling the toolbar to the menus.
    It now becomes a menu choice.

    D) Saved above as Normal.dot (or whatever template name you want)
    and exit VBA Editor

    Thanks
    David
    Last edited by dw85745; Jan 20th, 2011 at 11:20 AM. Reason: Added the correct "howto"

Posting Permissions

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



Click Here to Expand Forum to Full Width