Jay Freedman was telling us:
Jay Freedman nous racontait que :
ActiveDocument.Bookmarks("MyBookmarkName").Range.Text = "some text"
DeeJay, keep in mind that this will delete the bookmark.
If you need it for further processing, use something like this to restore
the bookmark after changing its content:
'_______________________________________
Const strBookMark As String = "MyBookmarkName"
Dim rgeBookMark As Range
Set rgeBookMark = ActiveDocument.Bookmarks(strBookMark).Range
rgeBookMark.Text = "Some New Text"
ActiveDocument.Bookmarks.Add strBookMark, rgeBookMark
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org