![]() |
#2
|
||||
|
||||
![]()
The value stored in the dropdown requires some form of separator to delineate the items. It's up to you what separator you use, but no separator will of itself tell Word to put something into a cell - you code has to do that. For example:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Dim i As Long, StrDetails As String With ContentControl If .Title = "Client" Then For i = 1 To .DropdownListEntries.Count If .DropdownListEntries(i).Text = .Range.Text Then StrDetails = .DropdownListEntries(i).Value Exit For End If Next With ActiveDocument.Tables(1).Rows(2) For i = 0 To UBound(Split(StrDetails, "|")) .Cells(i + 1).Range.Text = Split(StrDetails, "|")(i) Next End With End If End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
cksm4 | Word VBA | 13 | 07-02-2019 07:48 PM |
![]() |
DougsGraphics | Word VBA | 2 | 06-24-2015 07:31 AM |
![]() |
BrainSlugs83 | Word Tables | 8 | 11-14-2013 03:06 AM |
![]() |
ntjson | Word VBA | 1 | 04-04-2013 12:07 AM |
![]() |
jillapass | Word VBA | 3 | 05-29-2012 06:11 AM |