Jim Schwetz
asked on
How do I get this drop down box to work.
Trying to create a dynamic drop down list in Word using VBA
MO Word 2013 Windows 7 Enterprise
Currently, when I click in the first drop down, nothing happens. The first option shows, but I am not able to change it. the second drop down is blank.
I thought I would be able to click in the first drop down, then select one of the four values.
I am using Legacy Drop Down Form Field.
using this as a tutorial:
https://answers.microsoft. com/en-us/ msoffice/f orum/msoff ice_word-m so_winothe r/drop-dow n-menu-in- word/1d4ce 90e-f561-4 45f-9481-c 7eab949338 6
Here is my Word Doc with 2 drop downs.
This is just to learn it, my actual project will be for the user to use many drop downs and the values will create a letter that can be sent to the client. So depending on what the user selects, will populate the word document. I could have used Adobe Pdf with javascript, but then I would be the only one who could update it. I thought with word, the user could update any content themselves. but I am open to other platforms.
MO Word 2013 Windows 7 Enterprise
Currently, when I click in the first drop down, nothing happens. The first option shows, but I am not able to change it. the second drop down is blank.
I thought I would be able to click in the first drop down, then select one of the four values.
I am using Legacy Drop Down Form Field.
using this as a tutorial:
https://answers.microsoft.
Here is my Word Doc with 2 drop downs.
This is just to learn it, my actual project will be for the user to use many drop downs and the values will create a letter that can be sent to the client. So depending on what the user selects, will populate the word document. I could have used Adobe Pdf with javascript, but then I would be the only one who could update it. I thought with word, the user could update any content themselves. but I am open to other platforms.
Sub PopulateddState()
Dim MyCase As String
MyCase = ActiveDocument.FormFields("ddRegion").Result
Select Case MyCase
Case "North"
With ActiveDocument.FormFields("ddState").DropDown.ListEntries
.Clear
.Add "Michigan"
.Add "Ohio"
End With
Case "South"
With ActiveDocument.FormFields("ddState").DropDown.ListEntries
.Clear
.Add "Georgia"
.Add "Texas"
End With
Case "East"
With ActiveDocument.FormFields("ddState").DropDown.ListEntries
.Clear
.Add "New York"
.Add "Maine"
End With
Case "West"
With ActiveDocument.FormFields("ddState").DropDown.ListEntries
.Clear
.Add "California"
.Add "Oregon"
End With
End Select
End Sub
Doc3.docm
Usually it's better to attach the word document here, tracking errors will be MUCH faster.
ASKER
Thanks Kimputer, I just added it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@Norie, No i did not, I figured that just needed to be done before others could use it. I did not even think of trying that. I will try that now.
I now have my drop down functionality. Wow, I guess I should have at least tried that before asking. Thanks Norie and Kimputer
I now have my drop down functionality. Wow, I guess I should have at least tried that before asking. Thanks Norie and Kimputer
ASKER
Thanks for the fast answer, I did not realize that the restricted had to be on to test it. Thanks