Hi
I'm trying to have a date picker as one of the choices in a dropdown list, but since the items to choose from are only text, I'm stuck.
The situation is as follows:
I have a dropdown list with two choices: the check of the installation is done ('doorlopen' in the code below) or not done. When the check is not done, there is text: 'not done'. But when the check has been done, I would like to have again two choices: date unknown or date of check. This date of check should be entered by a date picker.
Is this possible or am I wishing for the impossible?
The code I'm using now is (thanks to GMayor):
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long
Dim oCC As ContentControl
With ContentControl
Select Case .Title
Case Is = "doorlopenJN"
If .ShowingPlaceholderText = True Then
Set oCC = ActiveDocument.SelectContentControlsByTitle("doorlopenTekst").Item(1)
oCC.LockContentControl = True
oCC.Range.Text = ""
Else
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
Select Case .DropdownListEntries(i).Text
Case "doorlopen"
AutoTextToCC "doorlopenTekst", ActiveDocument.AttachedTemplate, "DoorlopenJa"
End Select
Exit For
End If
Next
End If
End Select
End With
End Sub
(This is with an autotext to be inserted after the choice in the first combobox), maybe this would work also but I can't figure out how.
Thanks for any help.
Chris