View Single Post
 
Old 04-04-2020, 05:24 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

With regard to your template, your code is


Code:
Case Is = "Zomer/winter"
                If .ShowingPlaceholderText = True Then
                    Set oCC = ActiveDocument.SelectContentControlsByTitle("WinterTekst").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 "Kies een item."
                                    AutoTextToCC "WinterTekst", ActiveDocument.AttachedTemplate, "TipKeuze"
                                Case "Enkel in de winter"
                                    AutoTextToCC "WinterTekst", ActiveDocument.AttachedTemplate, "PrimerAnhydriet"
                                Case "Niet in de zomer"
                                    AutoTextToCC "WinterTekst", ActiveDocument.AttachedTemplate, "TipZomer"
                            End Select
                            Exit For
                        End If
                    Next
                 End If

There is no "PrimerAnhydriet" building block, so that one is never going to work, and Case "Kies een item." is superfluous as that is the placeholder text and always produces nothing because of the other half of the IF statement.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote