Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Use bookmark in IF statement
word 2007
I'm trying to use the value from a bookmark btwinex in an if statement. The value of the bookmark is inBTW The if statement {IF {REF btwinex }="inBTW" "prices are incl." "prices are excl."\*MERGEFORMAT } If the value of the bookmark is inBTW I keep getting the text prices are excl. If I change the IF statement to {IF {REF btwinex }="" ...... I get the text prices are incl. It seems that the bookmark empty after the merge. Can you use the value of a bookmark in an if statement. If so how? |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Use bookmark in IF statement
Bookmarks are destroyed during the merge, which may explain the problem
you are seeing. On the other hand, if the bookmark exists at the time the IF field is executed, then I suggest you (a) put spaces either side of the "=" sign and (perhaps) quote the REF field (although in practice I think that would only make any difference if you also have a bookmark called "inBTW"). e.g. {IF "{REF btwinex }" = "inBTW" "prices are incl." "prices are excl."\*MERGEFORMAT } Also, be sure that all the {} are the special "field code braces" that you can insert using ctrl-F9, not the ordinary ones you can enteron the keyboard. Peter Jamieson http://tips.pjmsn.me.uk Lodewijk wrote: word 2007 I'm trying to use the value from a bookmark btwinex in an if statement. The value of the bookmark is inBTW The if statement {IF {REF btwinex }="inBTW" "prices are incl." "prices are excl."\*MERGEFORMAT } If the value of the bookmark is inBTW I keep getting the text prices are excl. If I change the IF statement to {IF {REF btwinex }="" ...... I get the text prices are incl. It seems that the bookmark empty after the merge. Can you use the value of a bookmark in an if statement. If so how? |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Use bookmark in IF statement
Thanks Peter for your explanation and suggestion. I will give it a try. I
willl let you know if it is working. "Peter Jamieson" wrote: Bookmarks are destroyed during the merge, which may explain the problem you are seeing. On the other hand, if the bookmark exists at the time the IF field is executed, then I suggest you (a) put spaces either side of the "=" sign and (perhaps) quote the REF field (although in practice I think that would only make any difference if you also have a bookmark called "inBTW"). e.g. {IF "{REF btwinex }" = "inBTW" "prices are incl." "prices are excl."\*MERGEFORMAT } Also, be sure that all the {} are the special "field code braces" that you can insert using ctrl-F9, not the ordinary ones you can enteron the keyboard. Peter Jamieson http://tips.pjmsn.me.uk Lodewijk wrote: word 2007 I'm trying to use the value from a bookmark btwinex in an if statement. The value of the bookmark is inBTW The if statement {IF {REF btwinex }="inBTW" "prices are incl." "prices are excl."\*MERGEFORMAT } If the value of the bookmark is inBTW I keep getting the text prices are excl. If I change the IF statement to {IF {REF btwinex }="" ...... I get the text prices are incl. It seems that the bookmark empty after the merge. Can you use the value of a bookmark in an if statement. If so how? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
which statement right , question is Choose the correct statement? | Microsoft Word Help | |||
which statement right , question isChoose the correct statement? | Microsoft Word Help | |||
My noteref to valid bookmark says "Error! Bookmark not defined."? | Microsoft Word Help | |||
The Insert Bookmark box shouldnt vanish after adding a bookmark. | Microsoft Word Help | |||
IF Statement | Mailmerge |