Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
problem with if statement
Good afternoon, all,
I am using IF fields along with DOCPROPERTY fields to INCLUDETEXT conditionally. Here is my IF statement {IF {=OR({DOCPROPERTY Audience} = "ProgramOffice",{DOCPROPERTY Audience} = "All")} {INCLUDETEXT "{DOCPROPERTY FilePath}\\ContractsFundingsSourcesPO.doc"} "XXXX"} The problem is that the ContractsFundingsSourcesPO.doc is included no matter what audience is set to. Can anyone spot the error in the above? Thanks, Kathryn |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
problem with if statement
The problem is that OR is not a valid field (you're thinking of Excel,
perhaps?) -- but the IF statement apparently interprets the non-zero response as 'YES'. To diagnose this kind of problem, test the nested fields separately, eg {=OR({DOCPROPERTY Audience} = "ProgramOffice",{DOCPROPERTY Audience} = "All")} As you'll see, this gives !syntaxerror. wrote in message oups.com... Good afternoon, all, I am using IF fields along with DOCPROPERTY fields to INCLUDETEXT conditionally. Here is my IF statement {IF {=OR({DOCPROPERTY Audience} = "ProgramOffice",{DOCPROPERTY Audience} = "All")} {INCLUDETEXT "{DOCPROPERTY FilePath}\\ContractsFundingsSourcesPO.doc"} "XXXX"} The problem is that the ContractsFundingsSourcesPO.doc is included no matter what audience is set to. Can anyone spot the error in the above? Thanks, Kathryn |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem pasting landscape table rows | Page Layout | |||
Problem tabbing to enter data in table | Tables | |||
Weird Print to File Problem | Microsoft Word Help | |||
Wordwrapping problem when Korean fonts used | Microsoft Word Help | |||
Attaching Expansion Pack to Word Documents - Puzzling Problem | Microsoft Word Help |