This is step two in the series showing you how to create macro-enabled templates (METs). Click here for step one, preparing the document. For the finished product see the freebie file in this previous post.
Open up the document that you prepared in step one. At this point we need to open up the Microsoft Visual Basic editor. The easiest way to do this is by pressing ALT+F11 while having the template open in Word. In the Project Pane on the left hand side find the name of your document, mine is template.pleading. Right click on the name of your document, drag down to insert, then select UserForm.
If the blank form does not pop up expand the form folder and double click UserForm1 to display the blank form.
Now take a look at the Toolbox (if it isn't displayed click View>Toolbox). There are several tools here that we will not need to use. For now we're only going to focus on two, and later a third.
First Select the "Label" tool (

Now select the "TextBox" tool (

Continue these two steps until you've created and labeled a Text Box for each bookmark you created earlier. Note however, that if you're using the same value for multiple bookmarks you only need to create one text box. This is the whole point of using these METs, type information one time and it's replicated throughout the document as appropriate.
The final step in preparing the form is to insert the Command Buttons. Click the command buttons icon (

This concludes the preparation of the form. The next step is to Code the Form, and as many of you may guess, it's the trickiest part of creating the METs.
Brilliant post. Can't wait for Steps 3 & 4.
ReplyDeleteKeep up good work.
Thanks
Don't get lost on the mundane-ness of the example. A caption may be easy to reproduce, but imagine the power of automagically filling an entire purchase placement memorandum/articles of incorporation/ form interrogatories/ etc.
ReplyDelete