Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 04-03-2018, 09:34 PM
Guessed's Avatar
Guessed Guessed is offline Content Controls - Dependent Dropdown Windows 10 Content Controls - Dependent Dropdown Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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, 36 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Controls - Dependent Dropdown Dependent lists using content control SJPG Word VBA 4 01-05-2018 02:21 AM
Macro to save docx to doc that checks compatibility and converts content controls to static content. staicumihai Word VBA 4 10-12-2016 08:23 PM
Dropdown dependent text JakeLRL Word VBA 7 04-07-2016 08:26 AM
make text form field active dependent on dropdown Glenn0004 Word VBA 1 06-23-2015 06:13 PM
Word drop-down content control dependent display issue vvcat Word 6 02-03-2015 11:20 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft