I have a word document where there are lots of Yes/No drop down boxes.
Is there a way I could make them default to either of the 2 choices on
the click of a command button (or some other way) ?
Thanks.
rachitm@gmail.com was telling us:
rachitm@gmail.com nous racontait que :
> I have a word document where there are lots of Yes/No drop down
> boxes. Is there a way I could make them default to either of the 2
> choices on the click of a command button (or some other way) ?
Try this (Untested):
'_______________________________________
Dim aDoc As Document
Dim ffToReset As FormFields
Dim i As Long
Set aDoc = ActiveDocument
With aDoc.Range
Set ffToReset = .FormFields
If ffToReset.Count > 0 Then
For i = 1 To ffToReset.Count
Select Case ffToReset(i).Type
Case wdFieldFormDropDown
'Change to 2 if you want the second value
ffToReset(i).DropDown.Value = 1
End Select
Next
End If
End With
'_______________________________________

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org