Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] kbutterly@yahoo.com is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel Jezebel is offline
external usenet poster
 
Posts: 1,384
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem pasting landscape table rows [email protected] Page Layout 4 June 30th 06 11:01 AM
Problem tabbing to enter data in table srdiamond Tables 7 April 23rd 06 08:33 PM
Weird Print to File Problem Jon Barron Microsoft Word Help 0 April 12th 06 07:37 PM
Wordwrapping problem when Korean fonts used micro420 Microsoft Word Help 0 August 10th 05 09:56 PM
Attaching Expansion Pack to Word Documents - Puzzling Problem Jose Microsoft Word Help 1 March 3rd 05 10:14 AM


All times are GMT +1. The time now is 02:02 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"