![]() |
|
#3
|
|||
|
|||
|
Quote:
I did and I was thinking the following code in post #33 of that thread might be what I am looking for... 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 = Replace(.DropdownListEntries(i).Value, "|", Chr(11))
Exit For
End If
Next
With ActiveDocument
.SelectContentControlsByTitle("ClientAddress").Item(1).Range.Text = StrDetails
If StrDetails <> " " Then StrDetails = _
.SelectContentControlsByTitle("Client").Item(1).Range.Text & Chr(11) & StrDetails
.SelectContentControlsByTitle("ClientDetails").Item(1).Range.Text = StrDetails
End With
End If
End With
End Sub
For example, let's say the user types in the number 4444-333-55555. And that number in the combobox (named: "Drawing Number") has the following values: Laser Assembly RH|Steel, Polycarb|Rev N I want the first value to go to a contentcontrol named "Product Description" and the second value to go to a contrentcontrol named "Material" and so on... Thanks for any input you can offer.
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBA ppt ComboBox behaivor: 1.OnFocus change value 2. get dropdownlist doesn't disappear after mousec | janism22 | PowerPoint | 2 | 03-26-2015 12:35 AM |
| ActiveDocument.ContentControls(ID) not working | Tejas.T | Word VBA | 3 | 03-09-2015 06:50 PM |
| Updating grouped ContentControls in Word 2010 | MGerhard | Word VBA | 3 | 08-04-2014 02:34 AM |
Parsing 'FullName' column - help needed text to column
|
ScottA | Excel Programming | 3 | 05-06-2014 12:49 PM |
| XML parsing & Object variable not set (Error 91) | tinfanide | Excel Programming | 0 | 12-29-2011 08:43 AM |