Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
calebm12 calebm12 is offline
external usenet poster
 
Posts: 2
Default Making tables accessible in MS Word Forms Options

Have a challenge i cant seem to figure out. I am making a form that i
want to lock down, only allowing the user to enter text into the form
fields. However, part of the document consists of a table where they
will enter info into a cell then move on to another cell. The problem
is, depending on how much entries they have they might need to add
another row or two to the table. How can i allow this. I know
without a form lockdown all they would have to do is push tab and a
new row would appear. However this is not happening with a locked
form. How can i format the table to allow this??
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Making tables accessible in MS Word Forms Options

You will need to insert formfields into the cells of the table and set the
following macro to run on exit from the last cell of the table

Sub addRow()

' Macro created 02/02/03 by Doug Robbins
' To add a new row to a table containing formfields in every column
' automatically on exit from the last cell in the present last row of the
table
Dim rownum As Long, i As Long
Dim Response
Response = MsgBox("Do you need to add another row to the table?", vbYesNo +
vbQuestion + vbDefaultButton2, "Add another Row")
If Response = vbYes Then ' User chose Yes.
With ActiveDocument
.Unprotect
With Selection.Tables(1)
.Rows.Add
rownum = .Rows.Count
For i = 1 To .Columns.Count
ActiveDocument.FormFields.Add Range:=.Cell(rownum, i).Range,
Type:=wdFieldFormTextInput
Next i
.Cell(.Rows.Count, .Columns.Count).Range.FormFields(1).ExitMacro
= "addRow"
.Cell(.Rows.Count, 1).Range.FormFields(1).Select
End With
.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End With
Else ' User chose No.
Exit Sub
End If

End Sub



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"calebm12" wrote in message
...
Have a challenge i cant seem to figure out. I am making a form that i
want to lock down, only allowing the user to enter text into the form
fields. However, part of the document consists of a table where they
will enter info into a cell then move on to another cell. The problem
is, depending on how much entries they have they might need to add
another row or two to the table. How can i allow this. I know
without a form lockdown all they would have to do is push tab and a
new row would appear. However this is not happening with a locked
form. How can i format the table to allow this??



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making tables accessible in MS Word Forms [email protected] Microsoft Word Help 1 February 13th 09 01:20 PM
Making Custom Dictionaries More Accessible? e125 Page Layout 5 November 4th 08 02:18 PM
Making Forms in Word 2003 Mary Sue Dates Microsoft Word Help 2 January 4th 08 11:56 PM
Word Documentation for Making Forms Accessible Risikio Microsoft Word Help 3 October 3rd 06 02:42 PM
Spelling and grammar options are grayed out - not accessible COGirl Microsoft Word Help 3 May 13th 06 05:07 PM


All times are GMT +1. The time now is 10:56 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"