Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
champy champy is offline
external usenet poster
 
Posts: 2
Default Merged documents and IF statement

I use the herebelow script for merged documents.
Each individual field is well updated, but the if statement does not work.
Any idea?
Thanks
«Titre»
«Prénom»«Nom»
«Adresse_Ligne_1»
«Ville»





«Titre»,


Le cours aura lieu le lundi à {IF {Titre} = « M » « 14h » « 15 »}


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP on news.microsoft.com Doug Robbins - Word MVP on news.microsoft.com is offline
external usenet poster
 
Posts: 407
Default Merged documents and IF statement

I assume that M , 14h and 15 are not mergefields?

Also, you cannot insert the field delimiters by using the { } keys on the
keyboard. You must use Ctrl+F9 to insert them.

If you use Alt+F9 to toggle on the display of field codes, and assuming that
M is a mergefield, your field construction should look like

{ IF { MERGEFIELD Titre } = "M" "14h" "15" }

If you insert the Titre mergefield using the insert mergefield facility and
then toggle on the display of the field codes, it will then appear as

{ MERGEFIELD Titre } or maybe { MERGEFIELD "Titre" } - it does not matter
which

If you select that and then Press Ctrl+F9, you will get

{ { MERGEFIELD Titre } }

and you can then add the balance of the required text in the appropriate
places.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"champy" wrote in message
...
I use the herebelow script for merged documents.
Each individual field is well updated, but the if statement does not work.
Any idea?
Thanks
«Titre»
«Prénom»«Nom»
«Adresse_Ligne_1»
«Ville»





«Titre»,


Le cours aura lieu le lundi à {IF {Titre} = « M » « 14h » « 15 »}




  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Merged documents and IF statement

Doug,
I think you may have overlooked the fact that in French the quote characters
are « », which makes the OP's presentation more confusing to read for
English readers. Hopefully the characters survive the newsgroup format or
this will appear as gibberish
{ IF { MERGEFIELD Titre } = « M » « 14h » « 15 » }
is probably correct and that the problem is that of curly brackets being
typed?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Doug Robbins - Word MVP on news.microsoft.com wrote:
I assume that M , 14h and 15 are not mergefields?

Also, you cannot insert the field delimiters by using the { } keys on
the keyboard. You must use Ctrl+F9 to insert them.

If you use Alt+F9 to toggle on the display of field codes, and
assuming that M is a mergefield, your field construction should
look like
{ IF { MERGEFIELD Titre } = "M" "14h" "15" }

If you insert the Titre mergefield using the insert mergefield
facility and then toggle on the display of the field codes, it will
then appear as
{ MERGEFIELD Titre } or maybe { MERGEFIELD "Titre" } - it does not
matter which

If you select that and then Press Ctrl+F9, you will get

{ { MERGEFIELD Titre } }

and you can then add the balance of the required text in the
appropriate places.


"champy" wrote in message
...
I use the herebelow script for merged documents.
Each individual field is well updated, but the if statement does not
work. Any idea?
Thanks
«Titre»
«Prénom»«Nom»
«Adresse_Ligne_1»
«Ville»





«Titre»,


Le cours aura lieu le lundi à {IF {Titre} = « M » « 14h » « 15 »}



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
which statement right , question is Choose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 16th 06 11:15 AM
which statement right , question isChoose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 15th 06 11:20 PM
Merged documents BeverlyB Mailmerge 1 September 12th 06 04:33 AM
save all merged documents as seperate word documents iuwonny Mailmerge 2 February 15th 06 08:53 AM
best way to handle five documents that need to be merged in the e. outlook help Microsoft Word Help 1 February 25th 05 10:15 PM


All times are GMT +1. The time now is 08:55 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"