Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Forms & Signatures
HI,
I have a form that must go from one person to another, before be completed. The form has several Text Fields where people can enter their names. I would like to restrict and validate these fields to ensure that only particular people can sign off on certain sections of the form. So if 'PERSON1' generates the form and they have signed onto their computer with 'PERSON1', then only 'PERSON1' could add their name and not someone elses name. 'PERSON1' would be replaced by their actual name. Running Word 2003 on Windows XP on SBS Exchange Server with all the updates applied. -- Leslie Pollak Toronto, Ontario, Canada |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Forms & Signatures
There is no way to deal with this that a determined and experienced Word
user will not be able to circumvent and the example relies on the users having their usernames set for their own profiles in Word, however something along the lines of the following macros may help. The first macro is run on exit from the field that you wish to test the entry against the username. Ther second on entry to the following field to return to the Text1 field when an incorrect name is entered. The field Text1 in both is the field in which the name is entered. You might use a Dropdown field containing the legitimate names matching the various usernames in place of the Text field to minimise text entry errors - though hopefully the users would know how to spell their own names Sub OnExitNameField() Dim oFld As FormFields Set oFld = ActiveDocument.FormFields If oFld("Text1").Result Application.UserName Then MsgBox "You are not the authorised user", vbCritical, "Error" oFld("Text1").Result = "" End If End Sub Sub OnEntryFieldAfterName() Dim oFld As FormFields Set oFld = ActiveDocument.FormFields If Len(oFld("Text1").Result) = 0 Then oFld("Text1").Select End If End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Leslie Pollak wrote: HI, I have a form that must go from one person to another, before be completed. The form has several Text Fields where people can enter their names. I would like to restrict and validate these fields to ensure that only particular people can sign off on certain sections of the form. So if 'PERSON1' generates the form and they have signed onto their computer with 'PERSON1', then only 'PERSON1' could add their name and not someone elses name. 'PERSON1' would be replaced by their actual name. Running Word 2003 on Windows XP on SBS Exchange Server with all the updates applied. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Signatures In Protected Forms | Microsoft Word Help | |||
Signatures and Letterheads | Microsoft Word Help | |||
Merge Signatures .tif | Microsoft Word Help | |||
Updating Signatures | Mailmerge | |||
Signatures | Microsoft Word Help |