View Single Post
 
Old 09-16-2014, 03:23 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,338
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Function Ddown(oDoc As Document) As Boolean
Dim oFF As FormField, i As Long, bChng As Boolean
    On Error GoTo Err_Handler
    For Each oFF In oDoc.FormFields
        With oFF
            If .Type = wdFieldFormDropDown Then
                bChng = False
                If .Name = "Dropdown1" Then
                    bChng = True
                Else
                    For i = 1 To .DropDown.ListEntries.Count
                        If .DropDown.ListEntries(i).Name = "Select Vessel" Then
                            bChng = True
                            Exit For
                        End If
                    Next
                End If
            End If
            If bChng = True Then
                .Name = "drpVessel"
                'With .Dropdown.ListEntries
                '    .Clear
                '    .Add "Item 1"
                '    .Add "Item 2"
                '    .Add "Item 3"
                '    .Add "Item 4"
                'End With
                Exit For
            End If
        End With
    Next oFF
    Ddown = True
lbl_Exit:
    Exit Function
Err_Handler:
    Ddown = False
    Resume lbl_Exit
End Function
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote