Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lodewijk Lodewijk is offline
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Lodewijk Lodewijk is offline
external usenet poster
 
Posts: 4
Default 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

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
My noteref to valid bookmark says "Error! Bookmark not defined."? jchilders_98 Microsoft Word Help 3 October 5th 06 02:23 PM
The Insert Bookmark box shouldnt vanish after adding a bookmark. RogerKni Microsoft Word Help 4 September 26th 06 03:13 PM
IF Statement Shoelaces Mailmerge 5 November 23rd 05 06:54 AM


All times are GMT +1. The time now is 08:16 AM.

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"