BobY said:
I am attempting to "automate" portions of a Word form (e.g., user
enters start and stop times, next box exhibits elapsed), and have
forgotten how to define cells by bookmarking.
To set a bookmark on the selected text,
ActiveDocument.Bookmarks.Add Name:="myBk", Range:=Selection
or just
ActiveDocument.Bookmarks.Add Name:="myBk"
(the range is optional; if you omit it, the Selection is assumed).
To set a bookmark to a range that isn't selected, you can use a Range
object:
Dim oRg As Range
Set oRg = ActiveDocument.Sections(3).Range
ActiveDocument.Bookmarks.Add Name:="myBk", Range:=oRg
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.