Text form field losing macro when file saved as template

J

Jason V

I have a text form field that calls a macro upon exit.
I save the file as a template.
When I open the template( and create a new doc file) the new file has the
macros but the text form field has nothing in the run macro on exit box.

Help please. Thanks
 
R

Rob

I've found that in order to see a sub (macro) in a form field when the sub
isn't actually part of the opened document/template, you need the to have the
referenced template loaded in add-ins. Most of the time it's still there even
though you can't see it. I think you'll find if you load the original
template as an add-in the exit sub will magially re-appear.
 
J

Jason V

Rob,
Thanks for the response. I think you are on to something but please let me
describe the pronlem further. Not only does the macro not appear in the
Document1.doc file that is created after double clicking on the .dot file,
the macro does not run either upon exiting the form field. However, when I
look at the VBE for the document1.doc file the macros are there. Ironically I
have another template file that works just fine. So I do not know why this
one does not. If you could expand your point on this I would appreciate it.
Thanks
 
R

Rob

I apologize, I was away for a bit. I hope you have this solved by now but if
you don't...

The best I can do, probably, is tell you to load the template (as an add-in)
on which the document is based and see if that works. You could also look at
the one that does work and try to find a difference. Is that one loaded as an
add-in? Is the sub public in one but not the other? Sorry I can't help more
than that.
 
Top