Word - Macro checkbox

Asked By busterp on 05-Feb-10 11:29 AM
Word, making a template. I used form menu, chk box form field. The
design an alternative that would be DARKER.

So instead, I put in a text form field in a small cell with a border.
Type is regular text, one position, uppercase. Thus when I put in an

Rather than my way of having to put an "x" in the field, is there a
macro I could put in the text form macro on entry field that would
toggle a space (like the real chk box) between a checked and unchecked
box.


Suzanne S. Barnhill replied to busterp on 05-Feb-10 11:44 AM
Why not just apply bold formatting to the check box form field (and perhaps
make it a larger font size)?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
busterp replied to Suzanne S. Barnhill on 05-Feb-10 12:16 PM
ps

Hi Suzanne,

That was my first thought too. It does not seem to effect the actual
do.

I did tests with bold, arial bold, bigger sizing. I cannot get it to
stand out like a bold letter "X" does as an alternate method. I just
do not like having to type in an "X" .

rob
Jay Freedman replied to busterp on 05-Feb-10 03:31 PM
Have a look at Greg Maxey's page
http://gregmaxey.mvps.org/Add_Toggle_Objects.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Suzanne S. Barnhill replied to Jay Freedman on 05-Feb-10 06:17 PM
Those check boxes will not be compatible with other form fields in a protected
form, though, will they?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
Jay Freedman replied to Suzanne S. Barnhill on 05-Feb-10 08:28 PM
There is no problem with the MacroButton fields; they will operate even
if they are in protected text. However, the macros need some additions
if the form is protected.

In the CheckIt and UncheckIt macros, the document has to be
unprotected before the AutoText entry is inserted, and reprotected
afterward. For CheckIt,

Sub CheckIt()
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect
End If

ActiveDocument.AttachedTemplate.AutoTextEntries( _
Where:=Selection.Range

ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End Sub

and similarly for UncheckIt.

You also need to make sure the MacroButton field requires only one
click to fire, which means adding this line to the AutoOpen macro:

Options.ButtonFieldClicks = 1