Results 1 to 15 of 15
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    macros (2000/2002/2003)

    I need to create 10 small macros and apply them to a document. Can I then save the document to floppy disc, put it in other computers and have the macros become part of the Normal template? The macros are simple to create; I need to put macrons (small horizontal lines) on the vowels in Latin and then set up other computers to run the macros. Any suggestions or steps would be appreciated.
    Thank you very much.
    Alan Silberlight

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

    Re: macros (2000/2002/2003)

    Put the macros in a single module. On the other computer, you can use the Macros tab of the Organizer (started from Tools | Templates and Add-Ins...) to transfer the module to Normal.dot.
    Alternatively, right-click the module in the Project Explorer (in the Visual Basic Editor, on your PC), select Export... and save the module to a file. You can save this file to a floppy disk, then right-click in the Project Explorer on the target PC, and import the file.

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros (2000/2002/2003)

    Thank you for the quick response; unfortunately, I am having trouble understanding. I do not know what a module is. I created the macros. If I send you the file, can you tell me the steps I need to take to transfer the macros to the Normal template of the other computer? Thank you very much.
    Alan Silberlight
    Attached Files Attached Files

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

    Re: macros (2000/2002/2003)

    Macros are organized in units called modules; you can view and edit modules in the Visual Basic Editor.

    - Open your document.
    - Select Tools | Macro | Visual Basic Editor (or press the equivalent keyboard shortcut Alt+F11)
    - On the left hand side, you'll see the Project Explorer, resembling the left hand pane of Windows Explorer.
    - Expand your document, then expand Modules.
    - You will see one module under Modules; it is named NewMacros.
    - Double click NewMacros. This will open the module window.
    - The module window contains the VBA code for the macros you recorded.
    - If you wish, you can edit the existing macros, and write new ones from scratch.
    - You can get help on almost any item by clicking in it and pressing F1.
    - You can create a new (empty) module by selecting Insert | Module.
    - The idea is to store related macros in the same module.
    - Switch back to Word (Alt+F11 again).
    - Select Tools | Templates and Add-Ins...
    - Click the Organizer... button.
    - You'll see a window with 4 tabs (Styles, AutoText, Toolbars and Macros).
    - Activate the Macros tab.
    - You'll see two lists: one containing the modules in the active document, i.e. NewMacros, and one for Normal.dot.
    - If you select NewMacros in your document, the buttons between the two lists become enabled.
    - You can use them to copy, delete or rename the module.

    Once you have copied your document to another computer, you can use this to copy your module from the document to the user's Normal.dot.

  5. #5
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros (2000/2002/2003)

    I am very grateful for the time you have spent in helping me; when I get to the last step and click "Copy", I get an error message that says, "This project item cannot be copied." Am I doing something wrong? Thank you again.

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

    Re: macros (2000/2002/2003)

    Most probably, the Normal.dot you want to copy the module to already contains a module with the same name. It is not possible to have two modules with the same name in a document or template - it would lead to utter confusion! So use the Rename button to give the module a name that doesn't occur in the list for Normal.dot, then try to copy again.

  7. #7
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros (2000/2002/2003)

    Thank you again. I did rename it. That vworked; it copied over. However, there must be something that I do not understand. The individual macros do not work. Are you able to see the 10 individual macros in the file I sent you? My only workaround is to save the file as a template in the new computer or create the macros from scratch in the new computer. I am trying to avoid either of these.

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

    Re: macros (2000/2002/2003)

    I can see the ten individual macros in Tools | Macro | Macros... and in the Visual Basic Editor.

    What version of Word is running on the PC you copied the module to? Entering a Unicode character by typing its hexadecimal code followed by Alt+X was introduced in Word 2002, so I suspect the macros won't run in Word 2000. The following should work in Word 2000, however:

    Sub macronsmalla()
    Selection.TypeText Text:=ChrW(&H0101)
    End Sub

    If that is not the case, in what sense do the macros fail to work?
    - They aren't listed in Tools | Macro | Macros...? Make sure that 'Macros in' is either set to "All active templates and documents" or to Normal.dot.
    - They are listed, but they don't work correctly? Do you get an error message when you try to run one?

  9. #9
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros (2000/2002/2003)

    I am working with the same computer, trying to bring the 10 macros from the document into the Normal.dot file. The version of Word is 2003. When I use the organizer I see "New Macros," not the 10 individual ones. It's getting confusing.... Why do I not see the 10 individual macros? Thank you again.

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

    Re: macros (2000/2002/2003)

    You won't see the individual macros in the Organizer (I don't either). The Organizer lists modules, not macros, and you can't run a macro from the Organizer.
    To run a macro, select Tools | Macro | Macros... (or press the equivalent keyboard shortcut Alt+F8).

  11. #11
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros (2000/2002/2003)

    Dear Hans,
    I thank you for all of your help. I'll have to keep on trying. I know that there's something that I'm not doing right. At this point, it's easier trying one of the two workarounds. It's frustrating because the 10 macros are simple; bringing them into the Normal.dot template is eluding me. Thank you again.
    Alan Silberlight

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

    Re: macros (2000/2002/2003)

    What happens if you select Tools | Macro | Macros... or press Alt+F8? Do you see the individual macros?

  13. #13
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros (2000/2002/2003)

    Yes, I do. The document is open and I do see all 10.
    Thank you,
    Alan

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

    Re: macros (2000/2002/2003)

    And can you run them?

  15. #15
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Belle Harbor, New York, USA
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: macros (2000/2002/2003)

    Yes, no problem..
    Alan

Posting Permissions

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