Hi. I am creating form templates for an office, where individuals can
choose who the letter will be signed by. I would like to have the form
automatically fill-in that person's phone number based on the selection of
the person in the formdropdown box. Does anyone have a simple way of doing
this? I was thinking that a series of nested IF statements could work, but
thought that there may be an easier way.
Thanks in advance for any suggestions or ideas,
Karol
Greg - 28 Mar 2005 21:04 GMT
Karol,
Unless something better comes along I would use the recently grasped
(by me) Select Case method:
Sub FillInPhoneNum()
Dim oDoc As Document
Dim sigName As String
Set oDoc = ActiveDocument
sigName = oDoc.FormFields("Dropdown1").Result
Select Case sigName
Case "Janet"
oDoc.FormFields("Text1").Result = "XXX-1234"
Case "Bill"
oDoc.FormFields("Text1").Result = "XXX-1235"
Case "Bob"
oDoc.FormFields("Text1").Result = "XXX-1236"
Case Else
oDoc.FormFields("Text1").Result = "N/A"
End Select
End Sub
run on exit from the dropdown1 formfield
Graham Mayor - 29 Mar 2005 08:42 GMT
Alternatively, you could investigate - http://www.gmayor.com/SelectFile.htm
and use the method to insert autotext entries (which could include a graphic
of the signature if required)

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Hi. I am creating form templates for an office, where individuals can
> choose who the letter will be signed by. I would like to have the
[quoted text clipped - 6 lines]
>
> Karol