Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: want an error alert in mail merge

Geek News

want an error alert in mail merge
error display in word 11/27/2008 12:17:00 PM
hi,
when i mail merge using doc as my external source i made a field constant
using " if then else" from the 'insert word field ' tool.My result was
working fine.

requirement:
when i enter a replacement text other than what i had mentioned in the "if
then else " case i should get an error as we get in excel("data.. validation
.. show errors ).But its not prompting me for errors ...please help me on this
..

regards,
leo

Re: want an error alert in mail merge
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 11/27/2008 12:51:47 PM
As far as Word is concerned, an IF field just does what it says - if you
have { IF { myfield } = "X" "ABC" "" } then Word isn't going to do anything
special if { myfield } is not "X" - it just inserts a "".

If all you want is for Word to display a dialog box when { myfield } is not
"X" you can probably do that by using an invalid field, for example

{ IF { myfield } = "X" "ABC" "{=;}" }

However, this is a standard dialog box (it does not say what is wrong) and
this type of error will not prevent the merge from either continuing, or
outputting that Letter/Directory entry.

If you need to be selective about which records are merged, you can
- filter the records in the data source using Edit Recipients or
- (in some cases) use SKIPIF fields to cancel processing for records that
meet certain criteria or
- use Word VBA and Mailmerge events to prevent processing of certain
records.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"error display in word" <error display in word [ at ]discussions.microsoft.com>
wrote in message news:6CCE457C-44EE-4C85-8B7F-8D73E4D21ADA[ at ]microsoft.com...
[Quoted Text]
> hi,
> when i mail merge using doc as my external source i made a field constant
> using " if then else" from the 'insert word field ' tool.My result was
> working fine.
>
> requirement:
> when i enter a replacement text other than what i had mentioned in the "if
> then else " case i should get an error as we get in excel("data..
> validation
> . show errors ).But its not prompting me for errors ...please help me on
> this
> .
>
> regards,
> leo
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net