![]() |
#14
|
||||
|
||||
![]()
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
paul_pearson | Word VBA | 151 | 10-18-2023 04:23 PM |
Muliple entries in Multiple dropdown lists | Haygordon | Word VBA | 7 | 04-04-2019 06:28 AM |
VBA Word - Building Block (AutoText) - Array - Replace Text with Specific Building Blocks | jc491 | Word VBA | 7 | 01-03-2016 10:34 PM |
![]() |
rollno | Word | 7 | 02-24-2014 04:29 PM |
Building blocks show correctly in dropdown, but wrong building block populates in doc | wordgirl123 | Word | 0 | 10-03-2013 08:30 AM |