
Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham - many thanks for your elegant response. The REF field works well but
I am having porblems getting the "form field" to work although this might be
due to my personal lack of understanding.
The solution does not generate or update a text file, eg csv that would
provide a database or simple list of contacts. Maybe I did notstress the
importance of this feature.
My own rather fuzzy thoughts involved a MSGBOX, FILLIN or ASK as a front end
from where the namefield, addressfield would appear a) in all pages of the
form letter (there are 6 pages and the namefield appears 20 times) then
prints all pages and b) updates or appends a csv file database.
Sorry I did not make this clear
> If the only changes you are making to the document are to the name and
> address, then pop up the forms menu and insert a form field for the name and
[quoted text clipped - 17 lines]
> > easy using a message box and beginner's vba but I do not know where
> > to start.
Graham Mayor - 30 Jan 2005 08:02 GMT
The general principle of bookmarks and ref fields will still work, but the
requirement to append the input to a data file converts this from a simple
task to a more complicated one. Essentially you would run a macro on exit
from the last form field used, to gather the data from the bookmarks and
then write it to another document. If you start with a blank document called
(say) names.doc and you have two fields called Text1 and Text2 then
something along the lines of
Dim sName, sAddress, sOutput As String
sName = ActiveDocument.Bookmarks("Text1").Range
sAddress = ActiveDocument.Bookmarks("Text2").Range
sOutput = sName & ", " & sAddress & vbCr
Documents.Open FileName:="Names.doc"
Selection.EndKey Unit:=wdStory
Selection.InsertAfter sOutput
would add your field content to the names.doc file. It needs work to produce
a useable function, but it should set you on your way - there are plenty
of vba enthusiasts active in the Word vba groups if you need further help
with this.
A more elegant alternative would be to create a userform to gather the data,
but the principle is the same. There is lots of information on userforms on
the MVP web site (link in sig. block) to get you started with this.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham - many thanks for your elegant response. The REF field works
> well but I am having problems getting the "form field" to work
[quoted text clipped - 39 lines]
>>> easy using a message box and beginner's vba but I do not know where
>>> to start.
David Gladstone - 30 Jan 2005 10:41 GMT
Thanks
> The general principle of bookmarks and ref fields will still work, but the
> requirement to append the input to a data file converts this from a simple
[quoted text clipped - 64 lines]
> >>> easy using a message box and beginner's vba but I do not know where
> >>> to start.