Using checkboxes to create an action list

S

Simon Hicks

I'm writing a question and answer template in Word 2000 to gather
requirements for a project.

There are certain questions where the answer is not currently known and
these need to be converted to action points for the upcoming project.

The template currently has a load of questions with text boxes to gather the
answers but what I want to do is add a checkbox and a textbox to each of
these to determine whether an action is required and who that should be
assigned to.

Is it possible to put some code behind these boxes so that if the check box
is ticked then the details of the text box with the answer in and the text
box with the name of the person the action should be assigned to is added to
another section of the document?

Any help would be much appreciated.

Simon
 
L

lynn taylor

Hi Simon
There is a way you can do this which is quite simple.
Set your question and answer document up as a Word Form
using the Forms toolbar.

Everytime you insert a form field using the Forms
Toolbar, each field is assigned a bookmark name. For
text boxes it adds a bookmark of Text1, Text2 etc and for
each check box it adds a bookmark of Check1, Check2 etc.
You can rename them to something more meaningful, which
might be useful if you have quite a few - this way you
would know which answers, names and ticks went with which
question. To do this, for each form field you would need
to change the bookmark name using the Form Field Options
icon from the Forms Toolbar.

You could then check the formfields results like this
If activedocument.Formfields("Check1").result = true then
sAnswer = activedocument.formfields("Answer1").result
sName = activedocument.formfields("Name1").result
Selection.EndKey Unit:=wdStory
Selection.TypeText Text:= sAnswer & vbTab & sName & vbCr
End If

Of course you would need to do this for every check box,
or you could write a loop which checks all the check
boxes and performs an action for each one whose result =
true.

Hope this helps.
Lynn
 

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