Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automation using IF statements
I am trying to do an IF statement and it is not working.
If text76= "" Text10 Text76- it returns the bookmark name Text76 not the information contained in the cell. Any suggestions? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automation using IF statements
On Mon, 1 Oct 2007 14:14:00 -0700, JKeef
wrote: I am trying to do an IF statement and it is not working. If text76= "" Text10 Text76- it returns the bookmark name Text76 not the information contained in the cell. Any suggestions? You need to convert each of the bookmark names into a field (actually a Ref field, but the keyword Ref is optional) nested inside the IF field. Select each bookmark name in turn, and press Ctrl+F9. The final result, before collapsing the field code, should look like {If {text76} = "" {Text10} {Text76}} -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automation using IF statements
Thanks Jay, by saying I need to convert each of the bookmark names into a
field- I assumed when I created the text form field originally, they already were fields? I typed in your formula and received the results {Text10}? Am I missing a step? Thanks again "Jay Freedman" wrote: On Mon, 1 Oct 2007 14:14:00 -0700, JKeef wrote: I am trying to do an IF statement and it is not working. If text76= "" Text10 Text76- it returns the bookmark name Text76 not the information contained in the cell. Any suggestions? You need to convert each of the bookmark names into a field (actually a Ref field, but the keyword Ref is optional) nested inside the IF field. Select each bookmark name in turn, and press Ctrl+F9. The final result, before collapsing the field code, should look like {If {text76} = "" {Text10} {Text76}} -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automation using IF statements
In the formula within the IF field, you cannot just type braces around a
bookmark name; you must select the name and press Ctrl+F9. The result of that is a field within the IF field. Although the field delimiters look like bold braces, they're something completely different. JKeef wrote: Thanks Jay, by saying I need to convert each of the bookmark names into a field- I assumed when I created the text form field originally, they already were fields? I typed in your formula and received the results {Text10}? Am I missing a step? Thanks again "Jay Freedman" wrote: On Mon, 1 Oct 2007 14:14:00 -0700, JKeef wrote: I am trying to do an IF statement and it is not working. If text76= "" Text10 Text76- it returns the bookmark name Text76 not the information contained in the cell. Any suggestions? You need to convert each of the bookmark names into a field (actually a Ref field, but the keyword Ref is optional) nested inside the IF field. Select each bookmark name in turn, and press Ctrl+F9. The final result, before collapsing the field code, should look like {If {text76} = "" {Text10} {Text76}} -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automation using IF statements
Boy, Thanks Jay- the Text76 has turned into the actual results- I have
inserted all of the REF fields using Ctrl F9 then typing their name in the brackets (or through the field option choose REF- select bookmark Text10). But now my if statement doesn't work? I get text76 results or nothing. { IF { text76 } = "" {Text10) {Text76} Thank you again for all of your time! "Jay Freedman" wrote: In the formula within the IF field, you cannot just type braces around a bookmark name; you must select the name and press Ctrl+F9. The result of that is a field within the IF field. Although the field delimiters look like bold braces, they're something completely different. JKeef wrote: Thanks Jay, by saying I need to convert each of the bookmark names into a field- I assumed when I created the text form field originally, they already were fields? I typed in your formula and received the results {Text10}? Am I missing a step? Thanks again "Jay Freedman" wrote: On Mon, 1 Oct 2007 14:14:00 -0700, JKeef wrote: I am trying to do an IF statement and it is not working. If text76= "" Text10 Text76- it returns the bookmark name Text76 not the information contained in the cell. Any suggestions? You need to convert each of the bookmark names into a field (actually a Ref field, but the keyword Ref is optional) nested inside the IF field. Select each bookmark name in turn, and press Ctrl+F9. The final result, before collapsing the field code, should look like {If {text76} = "" {Text10} {Text76}} -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automation using IF statements
Hi Jay-
I figured out a work around. For whatever reason- it does not like the "" or " " sign. So I built the IF statement around a dropdown box. Again- thank you for your help! "JKeef" wrote: Boy, Thanks Jay- the Text76 has turned into the actual results- I have inserted all of the REF fields using Ctrl F9 then typing their name in the brackets (or through the field option choose REF- select bookmark Text10). But now my if statement doesn't work? I get text76 results or nothing. { IF { text76 } = "" {Text10) {Text76} Thank you again for all of your time! "Jay Freedman" wrote: In the formula within the IF field, you cannot just type braces around a bookmark name; you must select the name and press Ctrl+F9. The result of that is a field within the IF field. Although the field delimiters look like bold braces, they're something completely different. JKeef wrote: Thanks Jay, by saying I need to convert each of the bookmark names into a field- I assumed when I created the text form field originally, they already were fields? I typed in your formula and received the results {Text10}? Am I missing a step? Thanks again "Jay Freedman" wrote: On Mon, 1 Oct 2007 14:14:00 -0700, JKeef wrote: I am trying to do an IF statement and it is not working. If text76= "" Text10 Text76- it returns the bookmark name Text76 not the information contained in the cell. Any suggestions? You need to convert each of the bookmark names into a field (actually a Ref field, but the keyword Ref is optional) nested inside the IF field. Select each bookmark name in turn, and press Ctrl+F9. The final result, before collapsing the field code, should look like {If {text76} = "" {Text10} {Text76}} -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Supressing the ctrl-c and other keys during word automation in automation | Microsoft Word Help | |||
If then statements | Mailmerge | |||
PDF Automation | New Users | |||
conditional if statements | Mailmerge | |||
IF Fields With AND Statements | Microsoft Word Help |