Using asterisk (*) in IF field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I use an IF field to get Word to put one phrase if a bookmark is empty
and another phrase if the bookmark has any string of characters (1-128
characters, numbers or letters) within it? I've tried:
IF Text333 = "*" " et al. " " "
but this always lists " et al. "
 
According to the instructions in Word's Help, this should be working. Does
the bookmark refer to a form field? Does it make a difference if you rename
the bookmark in the Form Field Options?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
The following should work:

{ IF { REF Text333 } = "" "Bookmark is empty" "Bookmark has text" }

assuming that Text333 is the name of an existing bookmark.

But note that if this is a bookmark created by a text form field, it
is not empty on creation. Instead, it contains five spaces.

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
I tried your code, but it resulted with "Bookmark has text". How do I get
around the 5 spaces?
Text333 is an existing Bookmark.
The Bookmark was created with a text form field.
Thank you for your continuing help.
 
The Bookmark does refer to a form field. It doesn't make a difference what
the bookmark is named. Thank you for replying.
 
I think Stefan's point that the field by default contains spaces is the
issue here. Instead of comparing to "*", try comparing to " " (five
spaces) and reverse the TrueText and FalseText. You may need to nest a
condition to test for "" (empty field) in case users have deleted the
spaces.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Thank you again for your help.

I compared to five spaces, but it didn't work, so I reversed the TrueText
and FalseText, like you suggested, and compared to one space which suits my
needs. However, could you explain more about how to "nest a condition"
 
Hi John,

Try:
{IF{REF Text333}= " " "Bookmark is empty" "Bookmark has text"}
and be careful with the spaces - you need all the spaces shown.

Cheers
 
See the examples of nested (multiple) conditions in Word's Help topic
"Examples of IF fields."

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
I did and it was a big help. I've cut my workload in half! Thanx again for
the help.
 
Glad you got it working.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top