Announcement

Collapse
No announcement yet.

Saving a Macro in a Template

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Saving a Macro in a Template

    We are using Office 2003 (Word)

    I have created a template so that we can enter Test Data collected into a form for archiving and submitting to customers. Within these forms, I do some math to calculate certain parameters based on the test data collected. During this process I found it irritating to have to right-click on the calculation field in order to perform an "Update Field". So I found a macro which will automatically update all the fields in the document upon exiting certain data entry points. At this point all works well. I then protect the document and save it as a .dot (template). I'll copy the template to the network for our group to use. But when I open this template from another computer, the macro is non-existent. I've tried numerous times to make sure the macro is part of the existing template but I have not had any success after moving the template off my computer.

    Can anyone tell me the proper procedure to create and embed a macro within a template so that it is transportable? I'm about to go crazy!!!

    Thanks for any help you may be able to provide.
    Peter

  • #2
    Re: Saving a Macro in a Template

    IIRC the default macro location is the "normal" template so when you create it (I presume in VBA and not with the Macro Recorder) make sure it is saved with the currently open document. When you save that as a template the macro should be attached.

    Tom
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Saving a Macro in a Template

      Ok I went and tried that.

      But when I copied the saved template to the network, the macro did not carry over. Are you saying that I need to copy Normal.dot and install it in each persons computer indvidually?

      Comment


      • #4
        Re: Saving a Macro in a Template

        No -- macro's should stick to their "Parent" file. I just thought it might be saved in the wrong place.

        I know it works with documents -- macros stay without problems -- but will need to test templates.
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: Saving a Macro in a Template

          I gave up.. I went to each computer and manually added the macro to Normal.dot

          I just can't get it to be embedded in the template.

          Comment

          Working...
          X