can't adapt a word user form template

M

Mdmax

I downloaded a sample word template that has a user friendly form tha
creates a word document based on the form, but every time I try t
adapt or change the original document and/or try to save the templat
under a new .dot name the macros immediately stop working, even if
only change a single word of the original. What am I doing wrong
 
D

Doug Robbins - Word MVP

Based on that information it is not possible to say.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
M

Mdmax

I thought this may be a known problem. The sample template I hav
creates a pop-up form when you run the .dot template, as you fill i
the form and push the ok or command button (activex) it creates
document based on the form.

This works perfectly until I try to change anything (in the secon
document, not the form), if I try and save under a different .dot nam
the (pop up form) macro stops working, even though the changes I mad
to the (base or second) document it creates are saved. If I save unde
the exact same name, then my changes (to the base document) are no
saved, and the macro works as before, but creates the origina
document.

For instance the form creates a second document with the heading C
computing, if I try to change the second document heading to read M
computing, and save under a new .dot name, and try to run tha
template, the pop up form no longer works.

The sample template is at www.cdev.co.uk/utils/lettertemplate.asp
 
S

Suzanne S. Barnhill

When you create a document based on a template, it does not contain the
macros and UserForms that are in the template, so saving the document as a
template doesn't work. If you want to create a new template based on the
template, then create a template from the outset. In the New or Templates
window, select the radio button for "Template" instead of "Document" under
"Create New," and the new template will include the UserForm and VBA modules
in the original template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
M

Mdmax-clulessnoob

I actually learned to do what you describe, from your lessons on creating
templates 1 & 2. My problem, is that when I create the new template from the
existing document and save with new name, the target word document that the
form creates (not the pop-up form or VB code), becomes locked somehow and I
can't edit it anymore.

To get access to the target word document again (the document with the
bookmarks that the form populates with responses), I have to save the
previous template again under a new name, so that the text and bookmarks are
available for editing again. I want to be able to just open the original
template, edit all the elements (including the target doc), save the form
under it's own name, and be able to come back to it for further editing
later. I know I'm missing something simple here, thanks again.

Suzanne S. Barnhill said:
When you create a document based on a template, it does not contain the
macros and UserForms that are in the template, so saving the document as a
template doesn't work. If you want to create a new template based on the
template, then create a template from the outset. In the New or Templates
window, select the radio button for "Template" instead of "Document" under
"Create New," and the new template will include the UserForm and VBA modules
in the original template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
S

Suzanne S. Barnhill

Is this template something that you downloaded? If so, if you can provide
the URL from which you downloaded it, perhaps we can figure out what's going
on. I'm pretty clueless about VBA and UserForms, but I may know enough to
help, and, if not, there are plenty of others here who can.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Mdmax-clulessnoob said:
I actually learned to do what you describe, from your lessons on creating
templates 1 & 2. My problem, is that when I create the new template from
the
existing document and save with new name, the target word document that
the
form creates (not the pop-up form or VB code), becomes locked somehow and
I
can't edit it anymore.

To get access to the target word document again (the document with the
bookmarks that the form populates with responses), I have to save the
previous template again under a new name, so that the text and bookmarks
are
available for editing again. I want to be able to just open the original
template, edit all the elements (including the target doc), save the form
under it's own name, and be able to come back to it for further editing
later. I know I'm missing something simple here, thanks again.
 
M

Mdmax-clulessnoob

Suzanne, thanks for your response, your tutorials have been very helpful to
me. The sample form I have, is available at
www.cdev.co.uk/utils/lettertemplate.asp.

What happened was, that I was trying to edit the .dot file after opening and
running the file as a working template (but it then protects itself).
Another forum member informed me that I had to open MSword, and then open the
file with MSword, in order to have access to it, then, it is completely
available for editing and customizing.

Upon saving, the original macros work as before, and the file can now, be
opened as a template again (at least in word 2003). A simple matter that I
would have never figured out if not for some advice, thanks again.
 
S

Suzanne S. Barnhill

Okay, it sounds as if you have it figured out now. I think that when you say
"after opening and running the file as a working template," you mean "after
creating a new document based on the template," and of course that would not
work. And if you were just double-clicking on the file in an Explorer
window, the default action would be New (rather than Open), so that would be
the result. Opening the template and using Save As is the method that works,
I take it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
M

Mdmax-clulessnoob

New problem: I am able to customize the
(www.cdev.co.uk/utils/lettertemplate.asp) form, but I have created another
problem.

The new user pop-up form I have created is too long. When it pops up, the
bottom of the form (with the OK/command button) is now far below the
viewscreen, and cannot be accessed. Is there a way to make the form scroll?
Or do I need to make several pop-up forms, conforming to the size of the
viewscreen? Or...?

Thank you for your insights.
 
S

Suzanne S. Barnhill

One way this is often handled is to have multiple tabs on the UserForm
(comparable to tabbed dialogs). But this is beyond the scope of this NG; I
would suggest you post in microsoft.public.word.vba.userforms.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

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