Hi ?B?Q2hyaXM=?=,
In Word 2003, the data form button is in the Database toolbar. If your
cursor is in a table, clicking this button will convert each column to a data
field for entry in the dialog box. After completing, the data will be added
in rows to the table. This button can also be used to edit tables.
But, I too would like to know how to set up a template to either have a
button in the document that calls this functionality or have it pop up
automatically when the user reaches that part of the document.
Aha. Now, this is a very clear description and I "get it" :-)
The "button-in-the-document" is easier. Basically, the code to go with it would
be
Sub ShowTheForm()
If Selection.Information(wdWithinTable) Then
ActiveDocument.DataForm
End If
End Sub
The other way would be more elegant :-), but would require using
application-level events, which can be very complicated as soon as you need to
work in a "production" environment. If you want to explore that route, then I
recommend posting in the word.vba.general newsgroup. And don't forget to mention
the version of word, plus anything else that might affect how the
document/template will be used.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)