B
blwrs
I recently inserted this macro in my word document (visual basic).
Sub OnExitDropDown1()
Dim oFFs As FormFields
Set oFFs = ActiveDocument.FormFields
Select Case oFFs("DropDown1").Result
Case "Person1"
oFFs("Text1").Result = "1376"
Case "Person2"
oFFs("Text1").Result = "4847"
Case "Person3"
oFFs("Text1").Result = "4805"
End Select
End Sub
Dropdown1 is my dropdown list of names and I would like their phone numbers
to automatically appear in a field “Text1â€. I have the macro running on exit
of the dropdown menu. The problem I’m having is that the field “Text1†isn’t
automatically updating when I select the name in the dropdown menu. It will
work but I have to go to tools/macro and hit run every time I want it to
update.
Sub OnExitDropDown1()
Dim oFFs As FormFields
Set oFFs = ActiveDocument.FormFields
Select Case oFFs("DropDown1").Result
Case "Person1"
oFFs("Text1").Result = "1376"
Case "Person2"
oFFs("Text1").Result = "4847"
Case "Person3"
oFFs("Text1").Result = "4805"
End Select
End Sub
Dropdown1 is my dropdown list of names and I would like their phone numbers
to automatically appear in a field “Text1â€. I have the macro running on exit
of the dropdown menu. The problem I’m having is that the field “Text1†isn’t
automatically updating when I select the name in the dropdown menu. It will
work but I have to go to tools/macro and hit run every time I want it to
update.