Solved

Checkbox in Word 2008 (Mac) suddenly red

Posted on 2010-08-12
8
1,500 Views
Last Modified: 2012-05-10
I have been editing a word doc that has checkboxes.  I double-clicked a checkbox to see the properties dialog and change it from unchecked to checked.  After I did this, the lines of the checkbox turned red.

Also, now when I try to add a new checkbox, the lines are also red.  

How do I change the color of an existing checkbox, or at least get new checkboxes to show up with the colors I want?

See the attached image showing a checkbox that was checked when I received the document, the checkbox I checked, and another that was unchecked in the document when I received it.  

picture of checkbox that changed to red
This document was originally created on some PC Word version.
0
Comment
Question by:et01267
  • 5
  • 3
8 Comments
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 33428287
If the document was created in word, it would be difficult to determine what caused your problem.  That shouldn't matter as long as you can fix it.
See this link for code that will enable you to control the color of your checkbox:
                    http://www.eggheadcafe.com/software/aspnet/32164371/change-color-of-checkbox-with-click-event.aspx

Doug Robbins - Word MVP posted on Thursday, May 08, 2008 8:10 PM

You can't do the bold, but the following will toggle the color of the
CheckBox to which the bookmark name of "Check2" is assigned if a macro
containing this code is run on exit from that checkbox

With ActiveDocument
     .Unprotect
With .FormFields("Check2")
     If .CheckBox.Value = True Then
          .Range.Font.Color = wdColorRed
    Else
          .Range.Font.Color = wdColorAutomatic
   End If
End With
.Protect wdAllowOnlyFormFields, NoReset
End With
0
 
LVL 8

Author Comment

by:et01267
ID: 33428751
Thanks - I guess you've never used Word on a Mac.  No VB on the Mac.

I had looked at that link already -  unlike most people asking questions here I am able to type "google".  However, looking at it again, I got a hint (which I had already tried, but decided to try again):  unprotecting (or protecting) the document.

What I found before was that when I protected the document (which, as near as I can tell, is supposed to "activate" the form fields) -- wait for it -- all the checkboxes disappeared!  Now, I find that *only* the checkboxes that I had caused to be checked (and which turned red) remain after I protect the document.  Oh, and you can't undo this to get the checkboxes back, and unprotecting the document has no effect either.

There is some Applescript support for Word -- but that is even more arcane and bizarre than VB.  It may be easier to just switch my whole company over to Google Docs or OpenOffice (which may be a bit more limited, but have the advantage of working everywhere deterministically).
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 33430057
you are incorrect on two counts:
1. there is VBA for MAC Word     http://word.mvps.org/Mac/MacWordVBA.html
2. the solution I gave you was a solution for Mac Word.
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 
LVL 8

Author Comment

by:et01267
ID: 33430182
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 33430376
Yup, you are correct...no vba support for Mac Word 2008.  Looks like you will have to convert vba to AppleScript, which I understand is similar to vbScript.  See this link:
                              http://www.microsoft.com/mac/developers/default.mspx?CTT=PageView&clr=99-21-0&target=7b1c718f-a611-4612-b3cf-f96d4babbf261033&srcid=ad148fd4-1f3c-4690-8198-9a137b91f09d1033&ep=7
0
 
LVL 8

Author Comment

by:et01267
ID: 33431137
I dug up a virtual XP machine with Word installed.  It behaves almost exactly the same way with this document (except that the checkbox turns blue instead of red). Also, the macro won't run because the document is not protected - if I protect it, then all the checkboxes disappear (just like the Mac version).

OpenOffice, here I come.
0
 
LVL 8

Accepted Solution

by:
et01267 earned 0 total points
ID: 33433232
OK, I figured it out.  After digging around in the Word applescript sdef file and the MS docs online, and reading about Applescript and it's arcane syntax, and reading between the lines of the VB script that didn't work, I came up with this:

tell application "Microsoft Word"
      set props to font object of text object of form field "Check1" of active document
      set color index of props to teal
end tell

If you have the attached word doc open, and you run that script, it will change the color of the checkbox to teal.

Woo Hoo.
checkbox.docx
0
 
LVL 8

Author Comment

by:et01267
ID: 33433322
I figured it out using info that I had already found online (some of which the responders also provided). I would award partial credit but the broken point awarding page refuses to allow me to allocate points.  It just gives an error.  Sigh.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This article will show you how to use shortcut menus in the Access run-time environment.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

856 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