Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Oct 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Word macro via shortcut (Ms word 2003)

    Hello,

    I decided to open a new thread for that because it does not directly relate to my previous posting.

    i would have a question regarding the usage of a word macro. Is it possible to use a macro for several word documents (naturally with the same structure)? - for example that I have a shortcut which executes the macro? - does anyone know how to define this?

    Regards
    patrick

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

    Re: Access Word macro via shortcut (Ms word 2003)

    Store the macro in your Normal.dot template. It will be available in all documents.
    You can copy the code you now have to a module in Normal.dot.

  3. #3
    Lounger
    Join Date
    Oct 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Word macro via shortcut (Ms word 2003)

    could you probably explain what I have to do? - im not so familiar with that. [img]/forums/images/smilies/sad.gif[/img] and is it possible to execute the macro then via a shortcut or something?

    regards
    patrick

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

    Re: Access Word macro via shortcut (Ms word 2003)

    Open the document with the macro.
    Select Tools | Macro | Macros... or press Alt+F8.
    Select your macro Export2XL in the list, then click Edit...
    You will see the name of your document in the Project Explorer on the left hand side, with Module1 under Modules highlighted.
    Drag Module1 to Normal and drop it there. This will copy the module with the macro to your Normal template. The macro will be available in all documents.

    Switch back to Word using Alt+Tab or Alt+F11.

    Select Tools | Customize...
    Activate the Commands tab if necessary.
    Make sure that Normal.dot is selected in the dropdown list at the bottom of the dialog.
    Select Macros in the list of Categories on the left (you'll have to scroll down the list to see it).
    Select Normal.Module1.Export2XL in the list of Commands on the right.
    Drag it to a convenient place on a toolbar and drop it there.
    Right-click the new toolbar button.
    In the popup menu you can change the name (caption) of the button, select another button image etc.
    Close the Customize dialog when you're done.

  5. #5
    Lounger
    Join Date
    Oct 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Word macro via shortcut (Ms word 2003)

    Cool thank you very much hans, for the explanation, it works fine!

    regards
    patrick

Posting Permissions

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