What is wrong with this? What is the proper syntax for inserting text into
the bookmark?
Private Sub OptionButton1_Click()
ActiveDocument.Bookmarks(Cholesterol).Range.InsertAfter "your cholesterol is
fine."
End Sub
Dave Lett - 27 Jan 2005 14:26 GMT
Hi,
You need quotation marks around the name of your bookmark:
ActiveDocument.Bookmarks("Cholesterol").Range.InsertAfter "your cholesterol
is fine."
HTH,
Dave
> What is wrong with this? What is the proper syntax for inserting text into
> the bookmark?
[quoted text clipped - 4 lines]
>
> End Sub
Jonathan West - 27 Jan 2005 14:29 GMT
> What is wrong with this? What is the proper syntax for inserting text into
> the bookmark?
[quoted text clipped - 5 lines]
>
> End Sub
if the bookmark is named Cholesterol, then you need to put quotes round the
name

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Jezebel - 27 Jan 2005 21:26 GMT
Apart from the issue with quoting the name, your instruction is inserting
your text AFTER the bookmark, not into it. Is that what you intend?
> What is wrong with this? What is the proper syntax for inserting text into
> the bookmark?
[quoted text clipped - 5 lines]
>
> End Sub