![]() |
|
#13
|
||||
|
||||
|
Using the original example from: https://www.msofficeforums.com/word-...own-lists.html
you might add separate content controls named 'Phone', 'Fax' & 'Email', then use code like: Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long
With ContentControl
If .Title = "Client" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
ActiveDocument.SelectContentControlsByTitle("Phone")(1).Range.Text = Split(.DropdownListEntries(i).Value, "|")(0)
ActiveDocument.SelectContentControlsByTitle("Fax")(1).Range.Text = Split(.DropdownListEntries(i).Value, "|")(1)
ActiveDocument.SelectContentControlsByTitle("Email")(1).Range.Text = Split(.DropdownListEntries(i).Value, "|")(2)
Exit For
End If
Next
End If
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to populate dependent dropdowns and auto-fill text fields simultaneously?
|
vera | Word VBA | 1 | 10-07-2016 07:41 PM |
| Fill MS-Word docs/forms with name address data from external source | yajnaval | Word | 2 | 02-14-2015 10:48 PM |
| Problem with customizing outlook 2013 contact form | aroshlakshan | Outlook | 0 | 02-17-2013 02:58 AM |
Help with fill in form
|
RetiredFD | Word | 1 | 03-18-2012 12:52 AM |
Customizing the default contact form in Outlook 2010
|
Jackissimus | Outlook | 5 | 03-24-2011 02:33 PM |