Thread: Using Forms
View Single Post
  #7  
Old August 29th, 2006, 06:02 PM posted to microsoft.public.word.tables
Ray Dunn
external usenet poster
 
Posts: 5
Default Using Forms

I don't seem to be having much luck. Do the macros supposed to run
automatically? All of the vba code has been entered and I have set my
security to low, but when I open the file I get "Sub or Function not
defined"

Ray

"Jay Freedman" wrote in message
...
Yes, I believe it will work, with one small change.

The macros run when the template is used to create or open any document
based on that template, regardless of where the template's file is stored.

The change is needed because the template is in a read-only folder, so you
can't save it. The next-to-last line of the fourth macro should change
from

Templates(1).Save

to

Templates(1).Saved = True

This "lies" to Word and tells it that there hasn't been any change in the
template, so it won't attempt to save it or prompt for a save.

Can you set up the template on the server and do a trial run on one or two
workstations before the term starts? That will either prove that it works
or show where the problem (if any) is. If you get an error message when
you try to close the form, remove the fourth macro from the template
completely; then you'll have to restart Word to restore the original
function of the Enter key.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so all may benefit.

Ray Dunn wrote:
Jay,
Here is what I have. I am a high school teacher and I am having
students fill out information about themselves on a form that I have
created. I have 20 computers in my lab and a server. I do not want
to place the form on each computer, if I can help it. I planned on
placing the form on the server, where the student only has read
rights. Once they type their information, they print it and hand it
in. There would be no template, just the protected document in a
read-only folder on the server. Any ideas, will the macros still
work? Thanks,
Ray


"Jay Freedman" wrote in message
...
Hi Ray,

The macro *will* work -- it was developed specifically for use in
protected forms. However, it does assume that users are filling out
the form on a computer that has both the template (which must be
unprotected) and the form document based on the template. If you're
sending the form through email, this assumption is almost certainly
false. The method of setting an exact row height will prevent "ruining
the
spacing", if that's your only concern. The only time I'd worry about
newlines with this method is when the field contents will be
transferred to a database, or otherwise used in a context where the
additional material would show up.

There are no other alternatives that I'm aware of, unless you and
all your form recipients are using Word 2003.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

Ray Dunn wrote:
Thanks Suzanne, but I do not want them to be able to enter a new
line at all. The progammable macro doesn't seem like it will work,
due to the fact that the form will be protected. The form must be
protected. Any other ideas?

Thanks again,
Ray

"Ray Dunn" wrote in message
...
How can I limit users from entering a new line in a form field? I
have limited the number of charaters, but after protection is
applied the user can still hit the enter key. I don't want to ruin
the spacing on the page.
Thanks,
Ray
ps. Word 2003, win xp pro