View Single Post
 
Old 05-30-2019, 06:15 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If that field is working then you must have a bookmark in the document of the same name
Code:
Sub ResetBookmark()
  Dim sBkmk As String, aRng As Range
  sBkmk = "MyName"
  If ActiveDocument.Bookmarks.Exists(sBkmk) Then
    Set aRng = ActiveDocument.Bookmarks(sBkmk).Range
    aRng.Text = "Hello from the other side"
    ActiveDocument.Bookmarks.Add Name:=sBkmk, Range:=aRng
  End If
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote