I have a Word document with form fields and which is protected for
forms with a password - an online form. The document has electronic
signing functionality. When the user wants to sign the document they
click a command button (from the control toolbox), a userform is
displayed and they enter their user ID and password and, if validated,
the document is unprotected, the user ID and date is inserted and
document reprotected. The password to unprotect/protect the document
is hard coded within the VBA code.
This works well but I would now like to distribute the signing
functionality in a template to give users the ability to add electronic
signing to their own online forms. The problem is - how to let them
set the password in the protect document dialog and use the same
password in the VBA code to unprotect/protect when it comes to the
electronic signing as described above? Any ideas?
I'm currently looking for a Word 97 solution to this, but also looking
for a Word 2003 solution using a template or COM add-in. Any ideas?
Doug Robbins - Word MVP - 09 Jan 2006 18:27 GMT
Why not have the userID and Date inserted into formfields using the .Result
property of the formfields and you will then avoid having to unprotect and
re-protect the document and hence the need for the password to be supplied
to the macro.

Signature
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
>I have a Word document with form fields and which is protected for
> forms with a password - an online form. The document has electronic
[quoted text clipped - 14 lines]
> I'm currently looking for a Word 97 solution to this, but also looking
> for a Word 2003 solution using a template or COM add-in. Any ideas?
Tony James - 10 Jan 2006 16:37 GMT
Thanks, I hadn't thought of that. Is it possible to hide the form
field and prevent the user just bypassing the electronic signature and
entering their user ID and name? I know I can set the type to
'Calculation' to prevent data entry, but it can still be seen with
field shading turned on. Is there some other way?
Cheers Tony
Doug Robbins - Word MVP - 10 Jan 2006 18:56 GMT
You could use a DocVariable field in the template and have the code in the
userform assign a value to the variable and update the fields in the
document. The user would not then be able to access the DocVariable field
because it is not a formfield

Signature
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
> Thanks, I hadn't thought of that. Is it possible to hide the form
> field and prevent the user just bypassing the electronic signature and
[quoted text clipped - 3 lines]
>
> Cheers Tony
Tony James - 10 Jan 2006 22:56 GMT
Yes that would be a better method. Many thanks for your help.
Cheers Tony