Need help with enabling a check box and allowing changes

M

myoung3

I have a form that I need the users to be able to click the check box and
also be able to make changes on the form.

If I select "filling in forms" under the editing restrictions, we can't make
any changes to the form. If I select "no changes, read only" and allow
"everyone" exceptions, the check box won't work.

We are using Word 2007. Do you have any help for me?
 
M

myoung3

this article is not written for Word 2007. I can't seem to find the "style
window" in which to follow the directions...
 
J

Jay Freedman

Please go back to the article and scroll down near the bottom -- steps 11
and 12 -- to download the solution that Greg has already prepared for Word
2007.
 
M

myoung3

yea, I did that too. I'm still can't get it to work. :-( I've tried copy
and pasting his "toggles" into my form and I can't get them to work. I'm not
"macro" savvy so maybe that's my problem? I really appreciate the help you
are giving me.
 
S

Suzanne S. Barnhill

Did you install the template as a global add-in, as instructed? If so,
copying and pasting should not be required. Greg provides a link to his
tutorial on "Installing and Using Global Addins." (Greg, note that "an"
needs to be "and.")

Or, if you're using the provided VBA code instead, see
http://www.gmayor.com/installing_macro.htm for instructions on installing
it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
J

Jay Freedman

After downloading the zip file and unzipping it, copy the Toggle
Objects.dotm file into your Word Startup folder. If you're using Windows XP,
that's the hidden folder C:\Documents and Settings\<your name>\Application
Data\Microsoft\Word\STARTUP. If you're using Vista, it's C:\Users\<your
name>\AppData\Microsoft\Word\STARTUP. (To see either of these paths, you
need to open Windows Explorer, go to Tools > Folder Options > View, and
choose to show hidden files and folders).

Restart Word and open your form. Click where you want a check box. Go to
Insert > Quick Parts > Building Blocks Organizer. Select "Checked Box" from
the list and click the Insert button. Now you have a box that you can
double-click to check it and uncheck it.

If you're sending this form to other users, you need to add Greg's macros to
it. Press Alt+F11 to open the macro editor. Select your template in the
Project Explorer pane and click Insert > Module. Copy the code from Step 13
of Greg's page (starting with Sub AutoOpen() and ending with the End Sub
just above the heavy horizontal line) and paste it into the empty window on
the right side of the macro editor. Save the result as a macro-enabled
document (*.docm).

I'll suggest one improvement on Greg's code. Usually it takes a double-click
to activate a macrobutton field (which is what these toggle objects are).
You can make it take only a single click, like a real checkbox, by adding
this line to the AutoOpen() macro:

Options.ButtonFieldClicks = 1

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
M

myoung3

I think this is going to work for me. I would like to add the
Options.ButtonFieldClicks = 1 to the macro, but I'm not exactly sure where
it goes. Could you be a little more specific on where I should copy that
line to in the macro?

Thanks
 
J

Jay Freedman

It could go in any of several places, but I'll suggest inserting it between
these two lines:

Set oDoc = Nothing
'Clean up

so the result looks like

Set oDoc = Nothing
Options.ButtonFieldClicks = 1
'Clean up
 
M

myoung3

ok, so I put the line in where you indicated and saved it. But it still
requires a double click to use.
 
M

myoung3

also, when I send it to someone to test, she gets a message that says "macros
are disabled".
 
J

Jay Freedman

The macro is named AutoOpen, so it runs when you open an existing
document -- and if you followed Greg's instructions and saved the
macro in the form document, it runs when you reopen that specific
document. (Or, in the VBA editor, you could put the cursor in the
macro code and press F5 to run the macro.)

Your tester needs to save the document in a trusted location to
prevent its macros from being disabled. In Word 2007, go to Office
button > Word Options > Trust Center > Trust Center Settings > Trusted
Locations to find which folders are designated as trusted, or to make
a new trusted location. I'd strongly discourage adding the My
Documents folder or anything under it to the trusted list -- you
should trust only macros from sources you know are harmless.
 
M

myoung3

Jay, I want to thank you for all of your help. Hopefully with all of your
assistance, I can get this to work today. Talk care, and thanks again!

Michelle
 

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