?
Solved

Highlight Rich Text Content Control

Posted on 2014-09-19
4
Medium Priority
?
419 Views
Last Modified: 2015-06-30
I have a simple Word document I use in Word 2007 and 2010 that includes some rich text content controls as per the image below:

Rich Text Content Control Example
In this document there are several such controls and I feel that unless we can make these stand out (for example by highlighting the border in red) some controls may get missed.

Apart from entering some text and making it a different colour, is there a simple way to either make these stand out or force users to enter all items.
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 40332158
It's not clear why changing the text colour is unsatisfactory. There are several other ways to change the appearance of text, including font type and size, highlighting, borders and shading, underlining and putting it in a text box.

You would need to use VBA code to check that none of the controls are left with the default text.
0
 

Author Comment

by:Computer_Support_Norwich
ID: 40332629
Hi, many thanks for your response.

Changing the text colour inside the control is not ideal because once a user fills in that rich text control they will have to reset the text colour back to black which is an additional step in the edit process. Not a huge one of course so we might do that and live with it.

What VBA did you have in mind...? I've regularly used VBA in access development but never, ever done VBA in Word so if you have a sample that would be great!
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 800 total points
ID: 40333014
I believe you can have Form Fields shown as a grey box.

Thanks
Rob H
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 1200 total points
ID: 40333229
Here is a sample macro to count the unfilled fields and to reset the colour if they have been filled in.
Sub CheckCCS()
    Dim cc As ContentControl
    Dim iNotDone As Integer
    
    For Each cc In ActiveDocument.ContentControls
        If cc.Range.Text = cc.PlaceholderText Then
            iNotDone = iNotDone + 1
        Else
            cc.Range.Font.Color = wdColorAutomatic
        End If
    Next cc
    If iNotDone > 0 Then
        If iNotDone = 1 Then
            MsgBox "There is still a field to be filled in."
        Else
            MsgBox "There are still " & iNotDone & " fields to be filled in."
        End If
    Else
       MsgBox "All fields have been filled."
    End If
        
End Sub

Open in new window

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question