mail merge with text box in letter

L

Lori Ann

I have a mail merge document that has a text box in it for the user to enter
a specific date. I can't use the Fill-in field b/c when the msg box appears
for the user to enter the date, it locks up their computer. When I protect
the document, to allow auto-entry for that text box nothing is then
available, including the mail merge feature.

Any suggestions? Sorry if these is confusing or doesn't make sense!
 
P

Peter Jamieson

Which version of Windows and Word?

Is this Mailmerge document being loaded by another application (e.g. using
automation) ?

Does an ASK field cause the same problem?

To use ASK, you need something like

{ ASK mybookmark "prompt text as in the fillin field" }{ REF mybookmark }

where the {} are all the special field code braces you can enter using
ctrl-F9

If your FILLIN field is asking for a value /once/ at the beginning of the
merge (i.e., uses the \o switch) then the simplest alternative is probably
to use a small piece of VBA to
a. prompt for the text
b. set the value of a Word Document Variable
c. start the merge

At its simplest, it could be something like

Sub myfillin()
Dim strFillin As String
Dim objVariable As Word.Variable
strFillin = inputbox("Prompt string from your FILLIN box", "Dialog box
title", "Default value")
If strFillin = "" Then strFillin = " "
On Error GoTo varexists
ActiveDocument.Variables.Add Name:="myvar", Value:=strFillin
GoTo varcreated
varexists:
ActiveDocument.Variables("myvar").Value = strFillin
Err.Clear
On Error GoTo 0
varcreated:
ActiveDocument.MailMerge.Execute
End Sub

You would need to provide the user with a button to invoke the macro. You
would include the result of the Document Variable using a { DOCVARIABLE
myvar } field in the document.

If your FILLIN field asks the user for a value for each record in the data
source, you can't use that approach.

Peter Jamieson
 
P

Peter Jamieson

A couple of other things...
a. are you sure that the FILLIN+text box combination is locking up the
computer? Where is the text box? Is it in the body of the text, or in a
header/footer? Is the FILLIN dialog preventing anything else from happening
at all? If you do not use the \o switch in the FILLIN field the FILLIN
dialog box will appear for every record in the merge data source, and that
can make it appear as if the FILLIN box is "stuck"
b. Have you tried converting the text box to an old-style Word frame
(select the box, right-click, Format Text Box|Text Box|Convert to Frame)

Peter Jamieson
 

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

Top