Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2019, 12:37 PM
gmaxey gmaxey is offline Data Validation in Microsoft Word Template Windows 10 Data Validation in Microsoft Word Template Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Not sure what you are trying to do but as far as the Client Contact CC you do have, then something like this:





Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim oTbl As Table
Dim i As Long
Dim StrDetails() As String
With ContentControl
  If .Title = "Client Contact" Then
    Set oTbl = ContentControl.Range.Tables(1)
    If Not ContentControl.ShowingPlaceholderText Then
      For i = 1 To .DropdownListEntries.Count
        If .DropdownListEntries(i).Text = .Range.Text Then
          StrDetails = Split(.DropdownListEntries(i).Value, "|")
          oTbl.Cell(3, 4).Range.Text = StrDetails(0)
          oTbl.Cell(4, 4).Range.Text = StrDetails(1)
          Exit For
        End If
      Next
    Else
      oTbl.Cell(3, 4).Range.Text = vbNullString
      oTbl.Cell(4, 4).Range.Text = vbNullString
    End If
  End If
End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation in Microsoft Word Template Automate Job application word doc to Excel (with data validation) dylansmith Office 1 02-11-2018 12:58 PM
Data Validation in Microsoft Word Template Microsoft Office 2007 File Validation shenmue232 Word 4 02-02-2015 03:58 AM
Data Validation in Microsoft Word Template Data Validation drop down rkalapura Excel 1 05-27-2012 02:23 AM
If/then formulas with data validation shira47 Excel 1 04-09-2012 05:14 AM
Data validation with IF Klyxrastafari Excel 1 10-03-2011 04:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:07 AM.


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