forms in word

T

Terrie L

I need to create a school report for children. I need tables that the
teachers can shade with colour, to show how far along our continuum the
children are.
But I also want to have some components, like tick boxes and drop down menus
to eliminate teacher error. I also need to have a text box where the staff
can add comments, but are limited to 50 words that can be checked by spell
check. Where can I go online to find out how to do this. I have used the
developer tab in Word 2007, but am having trouble understanding the
difference between the drop down tool in the control section and the drop
down menu in the Legacy tools!
So how do I lock some parts, but leave other unlocked (eg the table for
shading?
 
G

Graham Mayor

I would use the legacy fields and lock all of it -
http://gregmaxey.mvps.org/Classic Form Controls.htm will help.

Put the comments fields in a (borderless?) table cell of fixed height and
width to limit the text entry. See
http://word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm

Use a dropdown field with (say) numbers 0-10 to avoid the need to colour the
table manually and run the following macro on exit from the dropdown to
colour the table. The macro will colour green the first row of ten column
table(1) according to the content of the field.

Sub ColTable1Row1()
Dim oFld As FormFields
Dim i As Long
Dim sCount As Integer
Dim bProtected As Boolean
Set oFld = ActiveDocument.FormFields
sCount = oFld("dropdown1").Result
If ActiveDocument.ProtectionType <> wdNoProtection Then
bProtected = True
ActiveDocument.Unprotect Password:=""
End If
For i = 1 To 10
ActiveDocument.Tables(1).Rows(1).Cells(i).Shading.BackgroundPatternColor =
wdColorWhite
Next i
If sCount = 0 Then GoTo Quit
For i = 1 To sCount
ActiveDocument.Tables(1).Rows(1).Cells(i).Shading.BackgroundPatternColor
= wdColorGreen
Next i
Quit:
If bProtected = True Then
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
End If
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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