View Single Post
 
Old 09-16-2018, 05:55 PM
jeffreybrown jeffreybrown is offline Windows Vista Office 2007
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Thanks Paul and sorry about posting in the wrong forum.

Since I have many different content controls in this one doc, I need to update the entire doc no matter what control is updated. I added the part in blue to the event below, but after the event fires, instead of the whole doc being selected, can I select maybe the cell below? The content control is in a table. What about if the user doesn't tab, but instead they just select some other cell?

Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long, StrDetails As String
With ContentControl
  If .Title = "MyCC_MAF" 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
  ActiveDocument.ContentControls(2).Range.Text = StrDetails
  End If
End With
With Selection
    .WholeStory
    .Fields.Update
End With
End Sub
Reply With Quote