Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oBM As Bookmark
Dim oRng As Range
Set oBM = ActiveDocument.Bookmarks("A") 'this is a bookmark associated with an ASK field
Set oRng = oBM.Range
oBM.Range.Text = "This is the new value" 'or use a value set by a userform control!
ActiveDocument.Bookmarks.Add "A", oRng
lbl_Exit:
Exit Sub
End Sub
|