Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2006

Tip: Looking for answers? Try searching our database.

mail merge with text box in letter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lori Ann - 10 Oct 2006 18:42 GMT
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!
Peter Jamieson - 11 Oct 2006 10:16 GMT
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

>I have a mail merge document that has a text box in it for the user to
>enter
[quoted text clipped - 5 lines]
>
> Any suggestions? Sorry if these is confusing or doesn't make sense!
Peter Jamieson - 11 Oct 2006 10:32 GMT
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
>I have a mail merge document that has a text box in it for the user to
>enter
[quoted text clipped - 5 lines]
>
> Any suggestions? Sorry if these is confusing or doesn't make sense!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.