View Single Post
 
Old 04-03-2018, 09:34 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Paul
I think the data was supposed to go into the CC immediately below the drop down. In which case, the code should have been
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
  Dim i As Long, StrDetails As String, aCC As ContentControl
  With ContentControl
    If .Title = "Current Vendor" 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
      For Each aCC In ActiveDocument.SelectContentControlsByTitle("Current Vendor Info")
        aCC.Range.Text = StrDetails
      Next aCC
    End If
  End With
End Sub
However, I still recommend using a Building Block content control solution which doesn't need any code as shown in the attachment. As a side benefit, using the building blocks allows you to format that vendor and vendor address information.

Once you settle on a method for doing the Vendor info, you will need to address the repeating info so that you don't have to repeat filling out the same info in multiple places such as (Property Name). Greg Maxey has a good tool available to assist with this - see https://gregmaxey.com/word_tip_pages...rol_tools.html
Attached Files
File Type: dotx Service Agreement and Term Letter.dotx (61.9 KB, 33 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote