How to select a checkbox in Microsoft Word from VB6

I am using VB6 to access a Microsoft Word template.  What I am perplexed on what to do is how to select a checkbox field as you can see from the attached image.  Currently Quarter 2 is selected.  How can I select Quarter 3.  I can bookmark the field, but I don't know the syntax for selection and checking the field.  Any help is appreciated.  


Here is some example code I am currently using in the document if that helps.

            objMSWord.ActiveDocument.Bookmarks(ObjectiveNumber).Select
            objMSWord.Selection.TypeText "ACTIVITY: " & rec!ActivityName & " - " & rec!ActivityType & "    " & rec!ActivityOther & vbCrLf
            objMSWord.Selection.TypeText "Identified Need: " & rec!Need & "    " & rec!NeedOther & vbCrLf
            objMSWord.Selection.TypeText "Objective Addressed: " & rec!Objectives & vbCrLf
            objMSWord.Selection.TypeText "Stated Strategy: " & rec!Strategy & vbCrLf
            objMSWord.Selection.TypeText "Outcome: " & rec!Outcome & vbCrLf
            objMSWord.Selection.TypeText "Narrative Summary: " & rec!Narrative & vbCrLf
            objMSWord.Selection.TypeText "-----------------------------" & vbCrLf & vbCrLf

Open in new window

example.jpg
al4629740Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
Hi,
What sort of checkbox?  Is it a Form Field, an Active X or a Content Control? If not in developer mode, all three types of checkbox look very similar.
The code seems to be adding text at a bookmark, so that doesn't help very much.
al4629740Author Commented:
I think form fields
GrahamSkanRetiredCommented:
To use the document, do you have to protect it for 'Filling in forms'?
GrahamSkanRetiredCommented:
If you simply want to check it or uncheck it, you can set the Value of the CheckBox property to true or false
Option Explicit
Sub FFCheckBox()
    Dim ffcb As FormField
    
    Set ffcb = ActiveDocument.FormFields("Check1")
    With ffcb
        If .CheckBox.Value = False Then
            .CheckBox.Value = True
        Else
            .CheckBox.Value = False
        End If
    End With
End Sub

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.