PDA

View Full Version : Text form fields are not retained during mail merge



RonNCmale
11-28-2010, 10:55 PM
I have this word document that when you click on the checkboxes it adds the point value to a total in a text form field. This form works great until I use mail merge and then the text form field disappears.
Attached is the word form. Any ideas on how to maintain the text form field?

macropod
11-29-2010, 02:46 PM
Hi Ron,

See: http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm

RonNCmale
12-01-2010, 06:47 AM
I'm using the Word merge code made by Albert D. Kallal, where would I place this code?

This is behind a button on my access database.
Private Sub OpenWordDocument_Click()
Dim WordAp As Object
Dim wordDoc As Object

MergeSingleWord

Set WordAp = GetObject(, "Word.Application")
Set wordDoc = WordAp.Documents(1)
wordDoc.Protect 2, , ""

End Sub

this picks up the last document and protects it allowing for checkboxes and drop down boxes to work but the text boxes do not.

RonNCmale
12-01-2010, 08:47 AM
I've attached a database and word document for anyone that wishes to give this a look.

macropod
12-01-2010, 10:47 PM
I'm using the Word merge code made by Albert D. Kallal, where would I place this code?I have no idea - having never seen the Word merge code made by Albert D. Kallal. AFAIK, Graham Mayor's code is supplied as a stand-alone solution.

RonNCmale
12-02-2010, 01:56 AM
Thanks anyway Macropod, in the download is the code by Albert Kallal and a word document if you wish to explore. I'll keep searching......

macropod
12-02-2010, 06:03 PM
Hi Ron,

There are well in excess of 1,000 lines of code in the Access DB attached to your post. From a brief look at it, I'd say you'd need to integrate the 80 or so lines of code from Graham Mayor's site into the code in Albert Kallal's 'Word Module' and change the output document as well. Doing so would require modifying both sets of code - and that's your job. VBA Express is not simple a fee (re)coding service. We're here to help when you run into problems with the implementation.

RonNCmale
12-03-2010, 03:57 AM
Thanks Macropod for taking a look. I don't have enough experience yet with VBA code, but I'm learning. Again sincerely, thanks for your time