Question in word letter where 2 responses are possible

A

ADZ

I am trying to create a word letter that is linked to another programme that
helps auto generate letters via mail merge.

I am trying to insert a question in word to be answered on generating that
letter to which 2 responses are possible and dependant on which option is
selected differing text is entered into the letter.

I have seen this on other mail merges but do not know how to do myself.
What I have seen is like EG. “is it red or green? 1=Yes, 0=Noâ€, you can then
select either 0 or 1.

I am using MS Word 2003.

Any help greatly appreciated.

Thanks.
 
G

Graham Mayor

Use an ASK field with the \o switch eg

{ ASK COLOR "Is It Red - Enter 'Y' or 'No' " \d Y \o }
{ IF { REF COLOR \*Upper} = "Y" "It's red" "It's not red" }

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
A

ADZ

Graham

Sorry you are not dealing with someone who is as advanced as you clearly are
at word. Could you explain where I enter these formula and if this is
suitable for inserting (for each option) an approximate page of varying text?

I guess I am asking for an idiots guide!!!
 
G

Graham Mayor

In the example quoted the first part is an ASK field which prompts for
information that will be stored in a bookmark 'COLOR' at the start of the
merge. The content of that bookmark is then used by means of a REF field,
which reporoduces its content, in a conditional field. If the user inserts Y
or y or accepts the default Y the first string of text is used 'It's Red'.
Anything else and the other string will be used. Those strings can be just
about anything that you can enter into a document. This could include
AUTOTEXT entries by means of an AUTOTEXT field.

The ASK field would go at the start of the document and the CONDITIONAL
field would go where you want the information to be reproduced. The brackets
{} are entered with CTRL+F9, the rest from the keyboard. Use F9 to update
and ALT+F( to display the content rather than the construction of the
fields. Note an ASK field does not display anything on screen until it is
updated. You can look up the syntax of these fields in Word help, but
essentially it is

{ ASK Bookmarkname "This is the prompt text - Enter 'Y' or 'N' " \d Y
\o }{ IF{ REF Bookmarkname \*Upper } = "Y*" "This is the text entered when
the condition is true" "This is the text entered when the condition is
false" }

As the text entered in response to the ASK field is case sensitive and we
are only interested in the answers Y, y, Yes, YES or yes, the conditional
field seeks only the first letter (using a wildcard *) and the REF field
switch converts the bookmark to upper case. The only downside is that Yellow
or Youth etc would report as true, though in practice this should not be an
issue.

If you wish to ask the question separately for each record in a merge, then
it would be far better to add the required test into the data source, then
instead of using a REF field you could use a MERGEFIELD in the conditional
field. The correct information would then be inserted for each record.

http://gregmaxey.mvps.org/Repeating_Data.htm may help.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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