Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-expand Word FormField Dropdown/Combobox

Status
Not open for further replies.

ACH381

Technical User
Apr 3, 2002
49
US
I'm runing an entry script on a dropdown type formfield in Word that automatically expands the dropdown when the field is selected & the value of the field is 1. I don't want to expand the field if the user has been in the field before and has selected a value other than the first blank value. I have the first option set to blank spaces so it displays as blank until one of the other options is chosen. If I just use the sendkeys command the "auto-dropdown" works fine. However, when I test the value with the If-Then statement the sendkeys command does not work. Here is the script. Any ideas?

Sub ExpandDropdown()
If ActiveDocument.FormFields("FF1").DropDown.Value > 1 Then Exit Sub

SendKeys "%{Down}"
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top