Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-30-2019, 06:15 PM
Guessed's Avatar
Guessed Guessed is offline Set REF field value (result) within VBA Windows 10 Set REF field value (result) within VBA 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set REF field value (result) within VBA Field not show result eduzs Word 9 06-02-2019 03:48 PM
Set REF field value (result) within VBA One Cell that controlls spread sheet result button to change simple fomula result RAH Excel Programming 5 03-31-2018 04:52 PM
Set REF field value (result) within VBA Result Calculator Raza Excel Programming 7 01-26-2015 11:35 PM
result of merge field is incorrect VHV Mail Merge 3 06-16-2014 03:46 PM
Set REF field value (result) within VBA Form field calculation returning 2x correct result Jschueller Word 1 08-20-2013 01:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft