Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
simonc simonc is offline
external usenet poster
 
Posts: 10
Default Word field with If then else

First, I'm using Word 2000 which might limit my options.

My data is in a spreadsheet. In the merged word document I want to insert or
not insert an address based on the first three characters of a field in the
spreadsheet.

ie something like: if first three characters of field Client = XYZ then put
in the address of client XYZ, otherwise leave blank.

Unfortunately, in the If then else dialogue the only options for comparison
are numerical - equal, less than etc. Is there a way of putting in a
condition related to a text field?

Grateful for advice.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word field with If then else

You may be able to get away with an IF field that looks something like this:

{ IF "{ MERGEFIELD Client \*Upper }" = "XYZ*" "{ MERGEFIELD Address }" "" }

- use ctrl-F9 to insert each pair of the special field braces {}, then type
everything else as text.

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

"simonc" wrote in message
...
First, I'm using Word 2000 which might limit my options.

My data is in a spreadsheet. In the merged word document I want to insert
or
not insert an address based on the first three characters of a field in
the
spreadsheet.

ie something like: if first three characters of field Client = XYZ then
put
in the address of client XYZ, otherwise leave blank.

Unfortunately, in the If then else dialogue the only options for
comparison
are numerical - equal, less than etc. Is there a way of putting in a
condition related to a text field?

Grateful for advice.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
simonc simonc is offline
external usenet poster
 
Posts: 10
Default Word field with If then else

Many thanks for this. It worked a treat.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Field Type - Fill In Prompt Problem (Word Insert Field in .NE Evan Putranto Mailmerge 10 October 9th 07 10:28 AM
Word: IF statement to merge a field only if another Field is popul HelenC Mailmerge 3 August 24th 06 10:33 AM
Saving word document with field results not field codes Cambdoc Microsoft Word Help 2 July 14th 06 10:51 AM
MS WORD - Linking a field in footer to a field in the document - Help SpaceApe Microsoft Word Help 4 September 22nd 05 06:19 AM
MS WORD - Linking a field in footer to a field in the document - Help [email protected] Microsoft Word Help 0 September 21st 05 12:16 PM


All times are GMT +1. The time now is 11:34 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"