Solved

Highlight Rich Text Content Control

Posted on 2014-09-19
4
318 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
  • 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 200 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 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Word Writer 1 61
Word 2010 mail merge 3 99
Excel Spreadsheet in a Word 2016 document. 3 65
Surface Book vs Surface Pro 4 86
Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

839 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