Wednesday, February 20, 2008

Word VBA UserForms Part 1: Intro

In light of Mike's recent post on template's I'll stick to the theme and get into UserForms. This will be the first post in a series of 4 showing you how to create a UserForm template.

Everyone knows that there's repetition in some of the more mundane details of the law. These highly repetitive documents are where you want to look to shave minutes off of preparation; While templates are good for ensuring consistency and beginning to trim time off your document preparation, UserForms are where you can really knock off a substantial amount of time.

During my summer internship I was able to (almost) completely streamline the new public defender client intake process using UserForms, bringing my new client intake time from close to 40 minutes down to something like 15-20 minutes (YMMV). The purpose of my doing this was as much trepidation of missing a step (you know... like forgetting to send the States Attorney a discovery request), as it was striving for efficiency. Regardless of the motivation, the end result was a ton of time saved in the process and the peace of mind of knowing that I wasn't skipping steps anymore.

[ShubE]I just want to add to Bill's intro here. If you are going into corporate law this is HUGE. Securities filings, PPMs, etc. all are huge repetitive documents. Big problems can be caused by missing something with your find and replace. It is far safer to create an automated document once and put a lot of time into making sure its right than to try to push something out at the last minute with a find and replace technique. We had a nightmare with this the summer I worked for a corporate attorney.[/Shube]

In using UserForms we're going to get into what's likely going to be some pretty intimidating stuff to many. If you've not used VBA (Visual Basic for Applications) before you're not alone. I had not previously done anything remotely related to this before undertaking this project, I was intimidated too. All you need is a desire to save some time and an easy to understand tutorial, that's where I come in.

The First thing we need to do is understand what UserForms do... I can sit here and tell you that it saves time, but you need to see for yourself. The people at have created this sample document, in the form of a interview invitation, (click to download). Download and open it and we'll take a look at the possibilities.

Enabling Macros
If you're working with the default Word settings you likely see a message that looks like the one below and a letter with a bunch of blanks in it.No biggie... Here's what we do.
1. Click Options on the banner.
2. This dialog box will display... As is shown, select "Enable this content" and then click OK.

3. The page will automatically refresh displaying the following form box.

Populating the Letter
1. Fill in the form with whatever you'd like... Play Mad-Libs.
2. Click OK. (man, these are really easy instructions).

Now take a look at the finished letter. All of the data that you entered will have been populated into the letter at their designated locations. This is a good start to the possibilities, but not a true representation of all the benefits these forms can bring to a law office. In the letter we've just created each form field is only placed into the letter one time, but Userforms are capable of doing more. Imagine a divorce document where the parties names will be put in 3 or 4 different places, you'd only have to enter the names one time on the form and they would be placed in each of the locations in the document that you designate.

That does it for Part 1 of UserForms. Stay tuned for Parts 2 (preparing the document), 3 (creating the form), and 4 (gasp, the code).
Share This Post!


Post a Comment