Results 1 to 13 of 13
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word Macro in Template (Word 2000)

    I have created macros in a word template that i need to copy to other computers. when i get it to other computers, and copy the template to their desktop for them to click on and fill in the form (with macros)...there are no macros in it. what am i doing wrong. I clicked on Add-ins and made sure I added this template to the global, so it would be available in all docs, but that only works on my computer, as soon as I transfer this word form (with protection) to anothers computer, the macros contained in it disapear and thats no good. must carry macros with it. I lowered the macro protection in security to Low, and that doesn't solve it. They just don't go with the template when taken to another computer. What am I doing wrong. did i make the macro wrong to begin with? am i supposed to put a global line in the code or something to make it transfer with the template?
    NMPadgett
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word Macro in Template (Word 2000)

    Templates cannot lose their macros when you copy them. However, it is easy to copy the wrong template. Since it is difficult to edit a template that is attached as an add-in (unless you also open it from disk), you might have unknowingly saved the macros into a different file.

    What I suggest is that you disconnect from all your global templates that might contain copies of the macros, and first check to make sure they are not actually in your Normal.dot. Then add back the most likely suspects one by one, checking their availability, until you are certain that you have found them and that they are all located in that template.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Macro in Template (Word 2000)

    I am attaching two jpgs of how my macros are stored. If you would take a look at it please. Have I got them in the wrong place in VBA? Should I have created these onexit macros for form fields in another portion of the VBA window. I'm still new at this, I'm afraid that's what I've done. They are listed under the normal, and you said not to do that. Now I'm stumped. When I go to Tools...AddIns...I also have the second picture I'm sending as jpg2. What is wrong with it...Why are there no macros listed above the left portion of the window which represents my template. The macros ARE there and work fine, but don't show in the window. They are "not" copying with the template, and that is what I am asking. Maybe by these 2 jpgs you can see my error, thanks jscher as always,
    Nannette Padgett
    Attached Files Attached Files
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re:3rd pic might help

    attaching a 3rd jpg of macro window which shows they are there, just don't copy with template when i open on another computer there not there, and are as if I never made them.
    Attached Files Attached Files
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re:3rd pic might help

    If you change the drop down in the Macro dialog to refer to an individual template, it should help you find out precisely where they are.

    I think the fastest and least trouble-prone way to move the macros from Normal.dot to your template is to do the following in the VB Editor:
    1. <LI>Right-click each module (e.g., Module1) and form that belongs in your template solution and choose Export.
      <LI>Select the TemplateProject. Then use File | Import to import into the template all the modules you exported. Open these to make sure they look good, and edit out anything that doesn't belong.
      <LI>Save!
      <LI>Remove the exported modules and forms from the Normal.dot template (right-click, Remove). Since you already exported the code, you don't need to do it again. If one of the modules (such as NewMacros) contains stuff you trimmed out of the template, you would do the opposite here and keep the stuff that is not template-specific instead of removing the module.
      <LI>Test! Everything should work the same. If it doesn't then we'll have to sort out what might have gone awry.
    I guess before doing the above, you should exit Word and make a backup of Normal.dot, just to be safe.

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re:3rd pic might help

    Jscher,
    Will try this as soon as I get home tonight. Will let you know how it goes
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re:3rd pic might help

    Lonelywind answered me as well jscher, and tried her method first because it sounded quicker and simpler...it solved it. Thanks to you jscher for sticking by me again, and thank you Lonelywind for giving me the answer I needed so quickly and so easily.
    NMPadgett
    Lonelywinds answer was;
    It would appear that you did indeed save your macros in your Normal.dot, rather
    than in the template. However, they can easily be copied from the Normal.dot to
    the template using the Organizer window, which is shown in your attachment.
    Having the Normal.dot open on one side, and your template on the other, simply
    highlight the macros in the Normal.dot to be moved and press the Copy button.
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Macro in Template (Word 2000)

    jscher, lonelywind, anyone who has a moment:
    I am attaching a bit of VB code on a word document. I have this code in my 5 page incident report, and it works beautifully, as far as creating the spellcheck button for a protected form. It acts like its running the spellcheck on the protected form, and finishes like it did, except it doesn't stop on any of my protected form fields and actually check anything at all. Could you tell me what I might be doing wrong? I also have this macro in the incident report template "all macros" folder. Is that the wrong place for it? I have put it into a module folder, and even left it as a project by itself, and still doesn't work. One thing that bothers me...Is there a portion in this code that would make it stop working if I indeed have section breaks in the form? That could be the problem...it never reaches the section (the narrative field) that I am trying to spellcheck? It does seem to stop on any typos I have in the origin of the form, my text that is that I used to create the table. It's not even supposed to be looking at my text, just the users input in the form fields that are protected. Help please. Its the last event in the incident report that must be hurdled. I'm not sure I understand the code that mentions wdWholeStory....is that mean entire form, fields and ALL. Well if it does, its not cutting it. I don't see it listed in the options to choose from, so where the programmer came up with it beats me. Thanks for taking a look at it. Actually if you click on the link here, and download teh MyFormSpeller Macro to try it out, it may be easier to see then me just sending you the code on a word doc. http://www.thewordexpert.com/tipwarez.htm then choose MYFORMSPELLER.
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  9. #9
    3 Star Lounger
    Join Date
    May 2001
    Location
    Burlington, KS, USA
    Posts
    209
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Word Macro in Template (Word 2000)

    Form fields are not spell or grammar checked, by default. This is controlled in the Language settings. To fix this, remove the protection from the form, select the form field, click on Tools > Language > Set Language, and uncheck the Do not check spelling or grammar check box. I'm not certain, but I believe this may be your problem.
    The postings on this site are my own and do not necessarily represent the position or opinion of WCNOC.

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Macro in Template (Word 2000)

    lonleywind.
    I have gone to the tools..language...and the check box is greyed out, but still has a check mark in it. I have removed the greyed checkmark to clear the box entirely, but everytime I return its still there in its greyed out form.
    How do i remove it entirely? I've tried unsetting it by single clicking each entire field in my form, and thats a task...there are 100's of them, and by CTRL A and doing as you say. I have tried it in seperate sections, and each frame of my table sepertely. I have sections, frames, and my fields inside table within sections and frames. Is the frames doing it? Why can't I turn the check mark entirely off?
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  11. #11
    3 Star Lounger
    Join Date
    May 2001
    Location
    Burlington, KS, USA
    Posts
    209
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Word Macro in Template (Word 2000)

    You are correct. Protecting the document removes proofing again in form fields.

    Taking a look at the SpellCheckForm macro, I can see where one line of code (indicated in Bold) could make the difference:

    <pre>ActiveDocument.Unprotect Password:=""
    Selection.HomeKey Unit:=wdStory
    Selection.WholeStory
    With Selection
    .LanguageID = wdEnglishUS
    .NoProofing = False
    ActiveDocument.CheckSpelling
    End With

    ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
    </pre>

    I have checked this, and it appears to work. Hope this is what you were looking for.
    The postings on this site are my own and do not necessarily represent the position or opinion of WCNOC.

  12. #12
    New Lounger
    Join Date
    May 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word Macro in Template (Word 2000)

    Make sure your MACROS belong to yours document or template. go to tools=> macro=>VBeditor. Open view=>Project Explorer. Check your macros not in Normal folder. If your macros in Normal move them to your document(template) Your can place them in module (Insert Module). and save. Close document (Template) . Moving file from one machine to other do not whipe out macros. You can check it reapiting all steps on the othe machine
    aepelman@yahoo.com <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

  13. #13
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Word Macro in Template (Word 2000)

    I haven't gone through this entire thread but you may find some help at Sharing Customizations for instructions and information on sharing / copying / moving customizations including macros, AutoText, Toolbars and menus, and key assignments.

    You may also want to look at Template Basics for information on kinds of templates, use of template folders, the tabs under File New and related information.
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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