Unprotect/Protect template problem

H

Helen

I have a multipage template form with large fill-in fields, and embedded
macros to allow the fields to be unprotected, spell checked, then reprotected
without resetting. The fields have been modified to work around the
autocorrect bug (i.e., not unlimited length). The form also contains macros
that force the document to open in protected mode, and to display a custom
toolbar that allows users to spell check without manually going through the
unprotect/protect sequence. Users save the filled in form for later review
and editing. We have hundreds of different forms with the same macros, and
they all work perfectly except this one form. Twice, for two different users
on different machines, the filled in saved form has spontaneously fired the
unprotect/reprotect sequence. At the same time, the custom macro that
protects the data fails to kick in, so the form opens apparently blank. (You
can only see what's actually happening on a really slow machine.) We just
found we can get the data back by disabling all macros using the security
settings before opening the screwy document, but only a few of our users are
capable of doing this without help (don't ask...). I already reprogrammed the
macros from scratch after the first occurrence, but it's happened again. Any
ideas?

Thanks!
 
C

Charles Kenyon

See my answer to your duplicate question with the subject "Template spell
check and security."

Note, the fields you describe are not fill-in fields but form text fields.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
H

Helen

Ah! The link you directed me to is most helpful. I thought this would be a
separate issue, though, as it's an error that occurs randomly on (apparently)
only one form of hundreds, where the custom code to open the document as
protected then fires the standard buggy unprotect/protect sequence instead of
the NewMacros code that preserves the field data. I guess I don't understand
enough to know what I'm seeing in the code to identify the answer there. Will
removing any tabs before fields fix that macro misfire in this form? Or does
it happen because the spell check has been activated at some point using my
code and then leaves a ghost behind?

Thanks much!
 
C

Charles Kenyon

Sorry, I didn't review your code because the macro on the site works and is
the product of hundreds of hours of work (I think) and collaboration by
minds far better attuned to vba than mine.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

Helen said:
Ah! The link you directed me to is most helpful. I thought this would be a
separate issue, though, as it's an error that occurs randomly on
(apparently)
only one form of hundreds, where the custom code to open the document as
protected then fires the standard buggy unprotect/protect sequence instead
of
the NewMacros code that preserves the field data. I guess I don't
understand
enough to know what I'm seeing in the code to identify the answer there.
Will
removing any tabs before fields fix that macro misfire in this form? Or
does
it happen because the spell check has been activated at some point using
my
code and then leaves a ghost behind?

Thanks much!
 
H

Helen

That's good to know. I'll just have to give it a try and see if it solves
this problem as well. I'll probably reprogram that one form from scratch and
see if that fixes it. In six months or so we'll be going to putting the info
on this form directly into our database anyway.

Thanks again!

Charles Kenyon said:
Sorry, I didn't review your code because the macro on the site works and is
the product of hundreds of hours of work (I think) and collaboration by
minds far better attuned to vba than mine.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
C

Christine Lisi

Hi, Helen. I am trying to accomplish something similar to what you've
already accomplished and I wonder if you can help. I, too, have a form with
protected fields and have attached the macros from KB article 191028 to the
form, which unprotects, checks spelling and then reprotects the document. I
set it up as an exit macro, which does not work in our situation. I'd love
to have it set up as a button. Can you tell me how I can do this or point me
in the right direction?

Thank you so much.

Christine Lisi
City of Delray Beach
(e-mail address removed)

Helen said:
That's good to know. I'll just have to give it a try and see if it solves
this problem as well. I'll probably reprogram that one form from scratch and
see if that fixes it. In six months or so we'll be going to putting the info
on this form directly into our database anyway.

Thanks again!
 
C

Christine Lisi

Scratch my request. Just by your suggestion, I figured it out. Thank you
SOOO much for that!

Christine

Helen said:
That's good to know. I'll just have to give it a try and see if it solves
this problem as well. I'll probably reprogram that one form from scratch and
see if that fixes it. In six months or so we'll be going to putting the info
on this form directly into our database anyway.

Thanks again!
 
H

Helen

Glad you figured it out! I've been scratching my head trying to remember what
I actually did (I'm bumbling along trying to learn this on the fly..). :)
The macro from the MVP site worked pretty slick, but making it accessible to
our least-common-denominator users was a problem. I created a custom toolbar
and embedded it in the template, then under Commands Macros I selected the
custom spell check macro and dragged it to the toolbar. I prettied it up a
bit with a new name and a distinctive icon, then added code that would force
the toolbar to be visible on opening or when a new document is based on the
template. We have a lot of people around here who couldn't find a "lost"
toolbar if it bit 'em. And if I can figure out how to program THAT, it will...
 
C

Christine Lisi

You're so funny. I can so relate to your user issues! My only remaining
problem is the fact that macros need to be enabled (set to low) and I'm
trying to automate that process but it doesn't look like it's possible. By
default this is set to High and in order for this macro to work the macros
must be enabled. I posted a question asking if there is any way to allow a
particular macro to run without effecting this setting. No response yet,
which leads me to believe there is no way. If you have any suggestions, let
me know.

Thanks, Helen!

Christine
 
C

Charles Kenyon

If your templates are in template folders you can have your macro security
set to medium or (I think) high, simply by checking the security option to
trust installed templates and Add-Ins. You do _not_ want it set to low!
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
C

Christine Lisi

Thanks, Charles. Yeah, I realize this and I will likely set it to medium,
but it still doesn't make me feel safe because we can't be with out users
every minute to make sure they don't enable macros at the wrong time! But
truthfully, we have excellent virus protection here along with great
firewalls and e-mail virus protection. That should keep us safe, no?

Also, do you know the specific registry value to change the macro security
to Medium?

Thanks,
Christine
 
C

Charles Kenyon

Try it on high with the provision to trust installed templates and Add-Ins.
I think it will work. Sorry, I don't know the registry values.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
H

Helen

Yeah, I was trying to automate, too, and head off the same dodo-brained user
behavior. I tried a number of sneaky tricks, each stymied by another "dumbing
down" issue. To make it simple to keep contract-required wording on our 200+
templates current with minimal assistance from IT, we needed to keep them on
the network only, so trusting installed wasn't an option. We also have a
number of people in high-turnover positions who share multiple computers --
some offsite -- necessitating doing the same setup over again each time they
log in for the first time at a new station. We ended up signing our templates
with a self-created digital signature, then had each user access a brief
series of step-by-step Word documents (with screen shots and command buttons)
that helped them change their settings to "medium" security, trust the
signature, and redirect Word to the correct workgroup folders. When we do new
setups, we (or they) simply run through the series and we're done, no need to
remember all the steps. If we have to make changes in setup, we make them in
the series, then ask people to take a minute to run just "Step Whatever"
again. It's probably not elegant, but it works for us, it's cheap, and users
can actually help each other.
 

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