Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Ck box - Form field (Word 2002)

    I have a document with a number of form field check boxes. Based on user choice, I want to make some of those True (checked) or False (unchecked).

    Using VBA, I am able to set the result to False, but am not successful at setting the result to True:

    ActiveDocument.FormField("mail").Result = False (this works as expected)
    ActiveDocument.FormField("mail").Result = True (doesn't work)

    In the second line of code above, the box does not display with the X... but if I unprotect the form and double-click it, the default has been changed from Not Checked to Checked. It appears that the code is making the change, but the field is not correctly displaying the setting.

    Any ideas on what's going on here... and how I can get around this? We supply a macro to edit this rather cumbersome form, and need to switch the result from True to False and vice versa depending on the user's choice.

    Thanks,
    Richard Barrett

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Ck box - Form field (Word 2002)

    Use the CheckBox property of the form field:

    ActiveDocument.FormFields("mail").CheckBox.Value = True (or False)

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Re: Ck box - Form field (Word 2002)

    Simple enough... thanks very much. Richard

Posting Permissions

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