Name your bookmarks chkBox1 and chkBox2
Private Sub comOK_Click()
Dim oBMs As Bookmarks
Dim oRng As Word.Range
Set oBMs = ActiveDocument.Bookmarks
Set oRng = oBMs("ChkBox1").Range
If Me.CheckBox1.Value Then
oRng.Text = "True"
Else
oRng.Text = "False"
End If
oBMs.Add "ChkBox1", oRng
Set oRng = oBMs("ChkBox2").Range
If Me.CheckBox2.Value Then
oRng.Text = "True"
Else
oRng.Text = "False"
End If
oBMs.Add "ChkBox2", oRng
Me.Hide
End Sub
Haroon wrote:
sorry about that Greg,
bascially, i have created a form in vba/word (word 2003) with 2
check boxes. I want users to select a checkbox and the value of that
checkbox gets populated in one of the bookmarks on the doucment.
e.g.
text1 []
text2 []
user selects text2 checkbox
the value of that text2 gets placed in bookmark on the document as
same name, e.g. text2.
hope i make sense this time
:
You really need to put a little more effort into describing what it
is that you really want to do.
In the subject you ask how to add checkboxes values to bookmarks.
In the body of your message you state "i want to display the text
of textboxes to be displayed on bookmarks when user preses Submit
button."
When you make up your mind I am sure that one of us will be able to
help.
Haroon wrote:
hi
i have few check boxes on the form, i want to display the text of
textboxes to be displayed on bookmarks when user preses Submit
button.
anyone got ideas?
thanks in advance