Hi,
Dim rng As Range
Set rng = Selection.Range
rng.Text = "bookmark1 text"
ActiveDocument.Bookmarks.Add "bookmark1", rng
rng.Collapse Direction:=wdCollapseEnd
rng.Select
HTH,
Dave
> Hi,
>
[quoted text clipped - 15 lines]
>
> Praveen
praveen - 25 Apr 2006 13:21 GMT
Hi Dave,
Thanks for your reply and it did work fine. Is there any way to add extra
space at the end of the bookmark text and set the cursor over there.
for exmaple [bookmarktext] I
where I is the cursor point or mouse pointer.
Cheers
Praveen
> Hi,
>
[quoted text clipped - 27 lines]
> >
> > Praveen
Greg Maxey - 25 Apr 2006 14:31 GMT
Sub Test()
Dim rng As Range
Set rng = Selection.Range
rng.Text = "bookmark1 text"
ActiveDocument.Bookmarks.Add "bookmark1", rng
rng.InsertAfter " "
rng.Collapse Direction:=wdCollapseEnd
rng.Select
End Sub
praveen - 25 Apr 2006 15:46 GMT
Hi Greg,
Thanks for the reply and it works fine.
> Sub Test()
> Dim rng As Range
[quoted text clipped - 5 lines]
> rng.Select
> End Sub