View Single Post
 
Old 05-05-2015, 12:24 AM
rogelinepaula rogelinepaula is offline Windows 8 Office 2013
Novice
 
Join Date: May 2015
Posts: 22
rogelinepaula is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
If you add the FillBM function that I pointed to in my earlier post you can simply call it as required to fill your document bookmarks (provided they don't overlap) e.g.

Code:
Private Sub CommandButton1_Click()
    Me.Hide
    FillBM "RepTitle", Me.TextBox1.Text
    FillBM "ReportDate", Me.TextBox2.Text
    FillBM "Client", Me.TextBox3.Text
    'etc
End Sub
I agree with Charles that it is better to use meaningful names for the elements, but let's not run before we can walk.
Much appreciated, Graham! So basically this will just be the code that I need to copy and just replace the bookmark values, right? For some reason when I try to use the first code, everything I've bookmarked in the document disappears but the title and the other info were autopopulated. I will try this code and will update you with the result. Have great day!
Reply With Quote