Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Checkbox in Word 2008 (Mac) suddenly red

Posted on 2010-08-12
8
Medium Priority
?
1,609 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
[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
  • 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
ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
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…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

719 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