View Single Post
  #2   Report Post  
Posted to microsoft.public.word.tables
Cindy M -WordMVP-
 
Posts: n/a
Default Q: Automatically adding form fields to new rows in table

Hi ?B?UmljaGFyZCBK?=,

I am working on building a template in Word that allows other developers to
simply input the necessary data for building a SQL table, such as the field
name, data type, column constraint, and a description.

Each of these elements is defined as a field inside four separate cells in a
single row of a table, such as:
| Field Name | Data Type | Constraint | Description|

Once the developer has entered a description and tabs to the next line, I
want to repeat the above information automatically on the next row of the
table as follows:
| Field 1 | SMALLINT | NOT NULL, | -- Field 1 |
| Field Name | Data Type | Constraint | Description|

Is this even possible?

If I'm understanding you correctly, what I usually do is to save the row *with
the form fields* as an AutoText entry in the template. The user clicks a button
to add a row, the macro behind the button
- unprotects the form
- inserts the AutoTExt entry (the row) at the end of the table
- reprotects without resetting the form fields

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)