Macro checkbox

B

busterp

Word, making a template. I used form menu, chk box form field. The
"X" (when checked) isn't dark enough for our taste so I'm trying to
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
"x" it prints a bold "X" in the cell.

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.
 
S

Suzanne S. Barnhill

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
 
B

busterp

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 USAhttp://word.mvps.org








- Show quoted text -

Hi Suzanne,

That was my first thought too. It doesn't seem to effect the actual
"X" in the center of the box. It's skinny and light no matter what I
do.

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

rob
 
J

Jay Freedman

Hi Suzanne,

That was my first thought too. It doesn't seem to effect the actual
"X" in the center of the box. It's skinny and light no matter what I
do.

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

rob

Have a look at Greg Maxey's page
http://gregmaxey.mvps.org/Add_Toggle_Objects.htm.
 
S

Suzanne S. Barnhill

Those check boxes won't 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
 
J

Jay Freedman

There's no problem with the MacroButton fields; they'll operate even
if they're 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( _
"Checked Box on the Fly").Insert _
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top