You are mixing techniques here. Either bookmarks or docvariables can be used. Your originally quoted macro used docvariables. FillBM is for bookmarks.
To reproduce the values in your document use Docvariable fields i.e. Type CTRL+F9 to give you {} then between type { DOCVARIABLE var1 }. When the macro is run that field will display the value you entered in the associated text box.
If instead you were using bookmarks, then but a bookmark (say) bm1 where you want the information displayed then call the function from the userform e.g.
FillBM "bm1", Me.TextBox1.Text
to write the cointent of the text box to the bookmarked location.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
|