Word 2003 - Where does Word store Userform code?

C

Congenital Kano

I created a template and userform to fill in a form letter for my wife's PTA treasurer job on my PC. Worked just fine - creating a new doc based on the template called the userform and passed the variables to the doc. I copied the letter template to various locations on her machine (including the default \users\...\templates) directory. The template shows up, but when I create a new doc based on the template the userform does not appear.

OK, I thought, maybe it's because her machine has Word 2002 and it was created in 2003; I install 2003 on her machine. No love.

Fine, maybe it is making a call to normal.dot, so I replaced her Normal.dot with mine. I know it is using my normal.dot because my macro buttons etc. appear. Still will not call the userform.

What am I doing wrong? What do I need to copy or change to call the userform from the template?

One thing that niggles my memory is whether I was asked to save the userform to a certain location - I don't remember (as I recall, you don't save the userform, just close the VBA window, but I may have been asked for a location the first time).

Any help will be appreciated. The trouble I get into when trying to be nice to my wife...

TIA!
 
G

Greg Maxey

I can only assume that the user form is part of the template project.

Open the template, then open the VB Editor (Alt+F11). Open the project explorer CTRL+r and see if you have a forms folder in the project that contains your form.

Did you include an AutoNew() procedure in your template to initialize and show the form?

--
Greg Maxey

See my web site http://gregmaxey.mvps.org
for an eclectic collection of Word Tips.

"It is not the critic who counts, not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man in the arena, whose face is marred by dust and sweat and blood, who strives valiantly...who knows the great enthusiasms, the great devotions, who spends himself in a worthy cause, who at the best knows in the end the triumph of high achievement, and who at the worst, if he fails, at least fails while daring greatly, so that his place shall never be with those cold and timid souls who have never known neither victory nor defeat." - TR


I created a template and userform to fill in a form letter for my wife's PTA treasurer job on my PC. Worked just fine - creating a new doc based on the template called the userform and passed the variables to the doc. I copied the letter template to various locations on her machine (including the default \users\...\templates) directory. The template shows up, but when I create a new doc based on the template the userform does not appear.

OK, I thought, maybe it's because her machine has Word 2002 and it was created in 2003; I install 2003 on her machine. No love.

Fine, maybe it is making a call to normal.dot, so I replaced her Normal.dot with mine. I know it is using my normal.dot because my macro buttons etc. appear. Still will not call the userform.

What am I doing wrong? What do I need to copy or change to call the userform from the template?

One thing that niggles my memory is whether I was asked to save the userform to a certain location - I don't remember (as I recall, you don't save the userform, just close the VBA window, but I may have been asked for a location the first time).

Any help will be appreciated. The trouble I get into when trying to be nice to my wife...

TIA!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top