![microsoft word content control conditional fields microsoft word content control conditional fields](https://learn.microsoft.com/en-us/office/client-developer/word/media/dk2_wordcc_fig05.jpg)
With the VBE open, press Ctrl+r to display the Project Explorer then look for and expand the project. If its permissible to have the content referred to in your last post appear in content controls somewhere in the body of the document, you could apply unique Style names to each of those content control ranges (e.g. However when I go to do the flow for it I am not given the fields that are on the template. I have used the Plain text control and have uploaded it to our SharePoint site. Hello, I am trying to build a Microsoft Word template. The VBA project can be accessed by pressing ALT+F3 to open the Visual Basic Editor (VBE). Populate a Microsoft Word Template Not Giving Fields. In Word conditional formatting encompasses having multiple sets of your result in an IF field where which one is displayed depends on the test in the IF field. Word is not really designed to handle conditional formatting. Creating a Form in Word - Adding Content Controls in a Microsoft Word Form. These include fields, document variables, bookmarks, table cells, formfields, content controls, and ActiveX controls. The simplest method is going to be to insert an Excel part for your table. Note: "Content ranges" refers to the target, or holder, of the conditional content displayed in the document. Red, Amber, Yellow, Light yellow and Bright green for the rest. My options are N/A, Category 1, Category 2, Category 3, Category 4 and Category 5. Online coding answer dont seem to solve and using standard formatting does not work either. Working with the demonstration documentsĮach of the demonstration documents contain a VBA code module and one or more "content ranges." I have a headache with defining conditional formatting in word based on a drop-down box selection. if field value Urgent then cell background colour is red if field value Minor Issue then cell background colour is orange if field value On Track then cell. Depending on the value selected I want to change the background colour of the cell, e.g. You can download the documents here or using the link at the end of this tips page. I have a table in a Word 2016 word document and in each cell is a drop-down list. Linking MethodsĮach of the methods for the four types of list controls is demonstrated and fully described in a four part series of demonstration documents. You just make a case for each control: Private Sub DocumentContentControlBeforeStoreUpdate(ByVal CC As ContentControl, Content As String) Dim strRisk As String Select Case CC. When considering which method is best (if any) to employ in your document design, you should keep the document user and his/her limitations and restrictions in mind. Protected formfield (legacy) dropdown listĪll of the methods except one of the formfield methods requires some VBA (macro) to run.This tips page provides multiple methods for linking conditional content to the following list control types:
![microsoft word content control conditional fields microsoft word content control conditional fields](https://petri-media.s3.amazonaws.com/2016/04/Figure1.jpg)
![microsoft word content control conditional fields microsoft word content control conditional fields](https://www.gmayor.com/Images_2018/ContentControlInsert01.png)
It is completely useless if the document user is limited to Word 2003 (and lower) or not permitted to enable and run macros! There are limits on how much text it can contain but you can use multiple fields. If you, as the document designer, have access to Word 2007 or higher it could work for you. The video illustrates an advanced method using a content control dropdown list and two plain text content controls "content ranges" to display the conditional content.