Variable # of rows in table in a Word *form*?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form which will be a template for users to fill in.

There are a number of tables which need to be in this form, and I need each
table to allow for a variable number of rows beyond the header rows. For
example, some users may need 5 rows of information, while others need only 2.

How can I accomplish this with Word 2003?

Thanks so much.
 
Set up the form with five rows. Some users will leave the last three empty.
 
5 was just an example. There is no upper limit. Thanks for the thought
though.
 
There's no way to have formfields automatically replicate. If the table
length is open-ended, then a Word form is not what you want.
 
Possibly; macros might offer a solution though.

However, maybe your right and Word really isn't quite what I need. What
tool would be better?

I can thing of some alternatives (not neccessarily better), but I'm stuck on
the word idea for the moment.
 
Yes, you could do it with a macro, but it starts to get very messy, and it
pushes up your support costs exponentially.

I've met people who swear by InfoPath and bits of SharePoint. Never tried
these myself, so I've no idea how much better they are (if at all).
 
If you can afford Adobe Acrobat, it makes excellent forms, which can be put
online, save data in databases etc. It has built in functionality for having
things added as needed (subforms). A bit of a learning curve but an excellent
form product that will do what you are asking.
 
' 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 Integer, i As Integer
ActiveDocument.Unprotect
ActiveDocument.Tables(1).Rows.Add
rownum = ActiveDocument.Tables(1).Rows.Count
For i = 1 To ActiveDocument.Tables(1).Columns.Count
ActiveDocument.FormFields.Add
Range:=ActiveDocument.Tables(1).Cell(rownum, i).Range,
Type:=wdFieldFormTextInput
Next i
ActiveDocument.Tables(1).Cell(ActiveDocument.Tables(1).Rows.Count,
ActiveDocument.Tables(1).Columns.Count).Range.FormFields(1).ExitMacro =
"addrow"
ActiveDocument.Tables(1).Cell(ActiveDocument.Tables(1).Rows.Count,
1).Range.FormFields(1).Select
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True

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

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

Back
Top