locked
Code for Content Control Drop Down RRS feed

  • Question

  • Word 2010 Template:

    I currently have code for a Legacy Drop Down form field and have recently switched over to a Content Control that is coming from SharePoint. Below is my current code and have no clue how to rewrite for the Content Control.  Also the Content Control is a Drop Down.  I have code set up on a Submit button.  When the user clicks on the Submit button, it verifies the field is not blank.  If blank, a Message Box requiring a selection goes off. Then the cursor goes to the field.

    Any help would be appreciated.  Thank you in advance!!!!

    With ActiveDocument.FormFields("Dropdown")
            If .Result = "Select Result from Dropdown" Then
                MsgBox "Please select a result from the dropdown list!", vbExclamation
                Selection.GoTo what:=wdGoToBookmark, Name:="Dropdown"
                Exit Sub
            End If
        End With

    Tuesday, May 30, 2017 12:33 PM