Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Cherrybrook, New South Wales, Australia
    Posts
    116
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Field code error (word 2003)

    I would really appreciate some help on a problem I'm having.

    I am trying to insert an IF field code into a header but get the error "Unknown Op code for conditional."
    I have attached a sample document giving the error.

    I have also copied the field code in plain text showing the field ends as simple braces.

    Can anyone help?
    I'm hoping to use this field in a header to make the header text conditional.
    The field without the IF works properly, wheter in the body or in the header but the IF field works in neither.

    I chose to use SUM rather than OR because I want to use 8 bookmarks in the condition and SUM seems to allow this.

    Thanks,
    Judith
    Attached Files Attached Files

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Field code error (word 2003)

    In your example, the field evaluates to <code>{ IF 2 True False }</code>, which I think Word does not understand (i.e., unlike some programming languages, "IF 2" is neither true nor false). What does the "2" signify, or what should it be compared against?

  3. #3
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    Cherrybrook, New South Wales, Australia
    Posts
    116
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Field code error (word 2003)

    Thanks for the reply. It's getting closer now.

    2 is recognised as FALSE since it's not 1 - but in the real document the bookmarks P1, P2 etc are never on the same page.

    I found I had to add an operator and a second expression.

    The final field is pretty complex and will need to be revised if I add a Part 9 but it seems to work OK.

    The first page of each Part has a local TOC. If the toc goes to a second page, the header is wrong, but that's not as bad as having the header wrong for the first page of each Part.

    Thanks,
    Judith
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •