View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Mailmerge fields WITHIN the text of IF-then-else

Hi Retread,

Assuming you're using the mailmerge toolbar to select the various mergefields, you could code your field as:
{IF«TOGGLE»= "M" "in memory of «FIRSTNAME» «LASTNAME». An acknowledgement will be sent as you requested." {IF«TOGGLE»= "H" "in
honour of «FIRSTNAME» «LASTNAME». An acknowledgement will be sent as you requested." "."} }
where «TOGGLE» is the name of the data field containing the 'M', 'H' or nothing.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message. Likwise, you can't type the chevrons (ie '« »') - they're part of the actual mergefields, which you can
insert from the mailmerge toolbar.

--
Cheers
macropod
[MVP - Microsoft Word]


"Retread" wrote in message ...
First, thanks to Doug MVP and "Ed" for previous comments regarding MM.
Reading them almost got me the whole way through my "problem". Using "Ed's"
suggestion from 4/5/2007, I tried to test one field three times :
if it's an "M" text should say "in memory of firstname lastname
(mergefields) then another sentence sending an acknowlegement,
if an "H", "in honor of firstname lastname, etc.
If blank, then put a period at the end of the preceding sentence.

I'm pretty new to this, and can't even figure out how to copy my actual code
into this question - ctl F9 doesn't work within this question box and doing
Edit, Copy, then Edit, Paste doesn't work either.
From the code I wrote by nesting Ed's statement (see above) here is what I
get :

in memory of . An acknowledgement will be sent as you requested.

MERGEFIELD FIRSTNAME MERGEFIELD LASTNAME fields (both bracketed by using Ctl
F9) don't show up after "in memory of".

I'm pretty new to this, and can't even figure out how to copy my actual code
into this question - ctl F9 doesn't work within this question box and doing
Edit, Copy, then Edit, Paste doesn't work either. I can send it to you as a
Word attachment if that would help.

Thanks - I'm sure this is simple but I'm stumped at the moment.