![]() |
#5
|
|||
|
|||
![]()
Hi there,
Name the Content Control you want populated with the same text, i.e. set the Title Property. Then this should work, e.g. Using SalesRep as the Title Property Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Dim i As Long Dim oC As ContentControl 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) For Each oC In ActiveDocument.ContentControls If oC.Title = "SalesRep" Then oC.Range.Text = .Range.Text Exit For End If Set oC = Nothing Next oC Exit For End If Next End If End With Set oC = Nothing End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Showing and hiding sections, duplicating text, etc. | Networkrail | Word | 1 | 07-11-2017 02:14 PM |
Figures keep duplicating | telonghemu | Word | 2 | 10-19-2016 04:47 PM |
![]() |
cschuett | Word | 4 | 10-25-2015 06:42 AM |
Outlook is Duplicating PST Files | DenverITGuy | Outlook | 0 | 06-12-2013 06:54 AM |
Auto Text | PineJ | Office | 1 | 03-21-2012 12:43 AM |