Thread: [Solved] Generating a Letter
View Single Post
 
Old 09-29-2015, 09:11 PM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote