#1   Report Post  
Posted to microsoft.public.word.docmanagement
Leslie Pollak Leslie Pollak is offline
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Signatures In Protected Forms Fishman4 Microsoft Word Help 1 January 3rd 07 04:01 PM
Signatures and Letterheads Joe McGuire Microsoft Word Help 1 September 29th 06 04:58 PM
Merge Signatures .tif Gladys Microsoft Word Help 6 May 11th 06 02:34 PM
Updating Signatures SSwan Mailmerge 2 November 1st 05 02:11 PM
Signatures Kath Microsoft Word Help 0 April 20th 05 02:57 PM


All times are GMT +1. The time now is 04:46 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"