Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2019, 09:31 AM
BradleyCase BradleyCase is offline Data Validation in Microsoft Word Template Windows 10 Data Validation in Microsoft Word Template Office 2016
Novice
Data Validation in Microsoft Word Template
 
Join Date: Jul 2019
Posts: 1
BradleyCase is on a distinguished road
Default Data Validation in Microsoft Word Template

Hello,

I have been toying around with simplifying a template that eliminates human errors. I've created data validation that is dependent on the value in a particular cell in Microsoft Excel, but I'm hoping to achieve the same thing using Microsoft Word. I have attached a template that is similar to my final product. Below is an explanation of what I'd like to achieve.

In the template, once a classification is selected (either level 1 or level 2), i'd like the Pay Package Table to automatically populate with the rates specific to that Level Classification. In the Content Control Properties for Classification, I have entered the values that I would like to be displayed int he Pay Package Table. Next, I'd like the same thing to occur when the Client Contact is selected. When a contact is selected, i'd like for that contacts phone and email to populate the Contact Phone and Contact Email boxes.



Any help with this would be appreciated.

Thanks,
Attached Files
File Type: docm Template.docm (37.0 KB, 9 views)
Reply With Quote
  #2  
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,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
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

Thread Tools
Display Modes


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 03:23 AM.


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