abvnewbie
07-15-2008, 11:49 AM
Alright, this one's been bogging me down and I'm sure it's simple but can't figure out a good work around.
Is there a way to set the default value for a Word formfields dropdown using VBA? It's simple enough to do so manually when you edit the dropdown attributes but the problem is that this dropdown is populated based on other user selections (simplified version below). So the question is, after populating the dropdown is there a way to make a certain value the default that will show up on the activedocument form without user selection? The default and value seem to be read-only attributes (can this be changed somehow?).
Set oDD = ActiveDocument.FormFields("changecause").DropDown
With oDD.ListEntries
.Add "Option A"
.Add "Option B"
.Add "Option C"
.Add "OTHER "
End With
I realize the simplest way to write the selection to the form is to use a text form field but I'd like to maintain the dropdown within the form in case the user wants to manually change the selection without having to go through the whole process of having the dropdown repopulated.
Is there a way to set the default value for a Word formfields dropdown using VBA? It's simple enough to do so manually when you edit the dropdown attributes but the problem is that this dropdown is populated based on other user selections (simplified version below). So the question is, after populating the dropdown is there a way to make a certain value the default that will show up on the activedocument form without user selection? The default and value seem to be read-only attributes (can this be changed somehow?).
Set oDD = ActiveDocument.FormFields("changecause").DropDown
With oDD.ListEntries
.Add "Option A"
.Add "Option B"
.Add "Option C"
.Add "OTHER "
End With
I realize the simplest way to write the selection to the form is to use a text form field but I'd like to maintain the dropdown within the form in case the user wants to manually change the selection without having to go through the whole process of having the dropdown repopulated.