Solved

Checkbox in Word 2008 (Mac) suddenly red

Posted on 2010-08-12
8
1,463 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
 
LVL 8

Author Comment

by:et01267
ID: 33430182
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now