phil was telling us:
phil nous racontait que :
> is there a way to apply this to many bookmarks without writing code
> for each bookmark
> thanks phil
Build an array with the bookmark names, textboxes values and another with
the checkboxes values and slap the code in a Loop.
Something like (Of course, you will have to build you arrays from your
userform values instead of using Strings and Split):
'_______________________________________
Dim BookRange As Range
Dim BookNames As String
Dim chkboxValues As String
Dim TextBoxes As String
Dim BookArray() As String
Dim chkBoxArray() As String
Dim TextArray() As String
Dim i As Long
BookNames = "here/there/over_here/that_spot/finally"
chkboxValues = "True/False/True/True/False"
TextBoxes = "First Text/Second Text/Third Text/Fourth Text/Fifth Text"
BookArray() = Split(BookNames, "/")
chkBoxArray() = Split(chkboxValues, "/")
TextArray() = Split(TextBoxes, "/")
With ActiveDocument
For i = 0 To 4
Set BookRange = .Bookmarks(BookArray(i)).Range
With BookRange
.Text = TextArray(i)
'CBool may not be necessary depending on how you build this particular array
.Font.Bold = CBool(chkBoxArray(i))
End With
'Redefine bookmark because it was lost when the text was inserted.
.Bookmarks.Add BookArray(i), BookRange
Next
End With
'_______________________________________
See
http://www.officecomputertraining.com/vbtutorial/tutpages/page22.asp
or
http://www.vbtutor.net/lesson13.html
for help on Arrays (The sites are for VB, but Arrays are essentially the
same in VBA).

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org