#1
|
|||
|
|||
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, |
#2
|
|||
|
|||
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 |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automate Job application word doc to Excel (with data validation) | dylansmith | Office | 1 | 02-11-2018 12:58 PM |
Microsoft Office 2007 File Validation | shenmue232 | Word | 4 | 02-02-2015 03:58 AM |
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 |