View Single Post
 
Old 09-16-2014, 03:06 AM
QA_Compliance_Advisor QA_Compliance_Advisor is offline Windows 7 32bit Office 2010 32bit
Advanced Beginner
 
Join Date: Jul 2014
Posts: 44
QA_Compliance_Advisor is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
OK, it is confirmed a form field and the document is unprotected, so the following will handle that. You can re-activate the commented out list section to change the vessel names.

This also revealed a minor bug in my batch process when run in Word 2010 that has now been fixed in version 2.3.

Code:
Function Ddown(oDoc As Document) As Boolean
Dim oFF As FormField
    On Error GoTo Err_Handler
    For Each oFF In oDoc.FormFields
        If oFF.name = "Dropdown1" Then
            With oFF
                .name = "drpVessel"
                'With .Dropdown.ListEntries
                '    .Clear
                '    .Add "Item 1"
                '    .Add "Item 2"
                '    .Add "Item 3"
                '    .Add "Item 4"
                'End With
            End With
            Exit For
        End If
    Next oFF
    Ddown = True
lbl_Exit:
    Exit Function
Err_Handler:
    Ddown = False
    Resume lbl_Exit
End Function
I have found that there is a more problamatic issue, not all dropdown that I want to change are named dropdown1, but there is a logic all the drop down in the list entry has "select Vessel". what logic would I need to have;

If dropdown list entry = "Select Vessel" then

carry out the change (obviously it probably aint that simple)
Reply With Quote