Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 05-04-2015, 09:46 PM
gmayor's Avatar
gmayor gmayor is offline Build an Automatic Document Template for Word Windows 7 64bit Build an Automatic Document Template for Word Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
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

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.
__________________
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
 

Tags
template, userform, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Build an Automatic Document Template for Word VBA using Building Blocks to build document kintap Word VBA 2 07-11-2014 10:56 AM
Create a Form to Build a Document Wordsquirrel Word VBA 7 05-16-2014 10:33 AM
Build an Automatic Document Template for Word One document build from subfiles duckman Word 3 03-04-2014 10:12 AM
Build an Automatic Document Template for Word Automatic update of links in template - closing attached template without saving stefaan Word 2 11-02-2013 07:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:57 PM.


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