News

Thoughts and Announcements

Hidden Microsoft Word Tools Anyone Can Use To Boost Productivity

As an attorney at a very small boutique practice, my time is precious and most of it is spent using Microsoft Word. While looking at ways to save time, save clients money, and centralize how I keep accurate data for use across different programs, I discovered several tools that can help just about anyone use Microsoft Word more effectively. While I use some plugins, like the FormTool, I found that autotext, the quick parts menu, and macros were the most useful tools at my disposal. These tools also happen to come free with Microsoft office, and do not take a lot of effort to uncover.

Since I had to study several different sources to learn how to use these tools, I thought I would try to put it all under one proverbial roof. I added a comments section to the end of this article so others can discuss ways that they have streamlined their office/law practice/word factory using Microsoft Word tools. I hope that some of you will share creative macro codes as well.

Before we get into things like macro codes, I will show you how to set up Microsoft Word to enable extra features, then I will give step-by-step instructions on setting up your own autotext and quick parts entries. After that, we will explore Macros, Visual Basic for Applications (“VBA”) code*, and set up forms to keep your documents safe from rogue editors.

*Don’t stop here if you are intimidated by the word “code” I just used! Stick with it- the investment in time you are about to make will be well worth it in the long run. Also, by allowing others to add codes they found useful, hopefully you will won’t have to spend sleepless nights researching code for a specialized task that can save you or your employees (or, and perhaps this is the most important- impress your boss!) countless hours spent re-typing documents over and over, or correcting silly mistakes from copying and pasting.

Last but not least, I use Word 2016. Other versions of word may differ slightly.

I.   How to Enable Time Saving Features- Turn on the Developer Tab

The first step in our journey begins with enabling the Developer Tab. This tab allows you to add drop down menus, form fields, and – wait for it – use the Visual Basic Editor. This tab also allows you to restrict editing to keep forms safe.

Enabling the Developer Tab

Click the file tab, then click options; then customize ribbon; then check the box next to “developer” in the menu on the right; then click OK.

While we won’t get into Macros just yet, it makes sense to enable to feature now before going to far afield.

Enabling Macros

Click the file tab; then options; trust center; trust center settings; disable all macros with notifications. Then click file; options; trust center; trust center settings (on the right); message bar (on the menu to the left); select the first option “Show the message bar…”; then click OK.

Now, it is important to enable saving templates so you can actually save the forms you use in the future. It is important to add this now before you forget, create the perfect form with flawless macros that add years to your life, then lose it because you can’t save it.

Enable saving templates

Click file; options; advanced; then, in “saving” section about 3/4ths of the way down, click box for prompt before saving normal template. Then click OK.

Great! Now lets use these features we just enabled.

II: Autotext

This is a personal favorite, and mastering this feature can save you immense amounts of time. It is also one of the easiest features to set up.

I’m sure you’ve noticed that a little prompt pops up when you start typing a date on your documents. If you hit enter, viola, you have todays date. This is autotext. Documents that you use frequently can autopopulate just by typing a word or two onto your document. I use this feature to add my letterhead to a document, create a Notice of Appearance, type retention letters, contracts for representation, and file closing letters.

A hidden trick here- you can enter blank fields onto an autotext entry, then run a second program to populate those fields. So, by typing a few characters, hitting enter, then running a program I use to enter data from spreadsheets onto a word document, I can create technical documents that are over ten pages long- all the while knowing that the document is accurate. Always proofread, of course, but save yourself the time you spend cutting, pasting, and typing before you get to that stage.

How to set up auto text

Type out or copy and paste to create a document you want to use as a template. Then click the home tab; then click select (on the far right); select all (if you want to save an entire word document as auto text. Otherwise, just select the text you want to save);

With your selection highlighted, click the insert tab; then, about ¾’s of the way across the ribbon to the right, you will see an icon in the text sub-menu that looks like a rectangle with other small rectangles inside of it. Hover over it if you aren’t sure if you have the right icon, but we are looking for the explore quick parts menu;

Below the bigger boxes that come up you will see Autotext. Hover over this entry and a sub menu will pop up. At the very bottom of this second sub-menu, click save selection to autotext gallery.

A pop up box will appear. The first field asks what the name of the autotext entry will be. This is what you will begin typing to prompt the autotext pop up. So, if you want to type “welcome letter” and have your office’s welcome letter autpopulate, this is the place to type that command.

In the gallery menu, select where this autotext entry will be housed. For autotext purposes, you will likely want to save the entry in the autotext gallery. If you create, say, a letterhead that will autopopulate in the header of a document, you may want to save the entry in the header gallery.

As you become more familiar with the feature and add more entries you may want to save them in categories. To make new categories and then add your entries to them, click “category” and follow the prompts.

Lastly, you will want to save the entry in “normal” – at least for now. This will save the addition you just made and allow you to use it in all of the documents you create from here on out. You can also add the entry to your building blocks gallery, which we will explore in more detail later.

And that’s it! Now you can re-use pages upon pages of text by just typing a few characters and hitting enter.

III.  Quick Parts/Building Blocks

Now, the next frontier- using the quick parts menu and adding building blocks. This will allow you to save paragraphs, or more, and enter them to documents by clicking an icon on the ribbon or accessing the text through the quick parts menu itself. You can also save your text in special folders so you can, for instance, save contract clauses in your quick parts menu, then pull them up individually to create a customizable contract quickly and accurately. You can also add graphics, shapes, or other objects, and you can save things like headers, footers, and customized tables of contents.

We’ll start with an easy example. Lets create our own letterhead and save it to the quick parts menu.

How to add building blocks

Type or paste your letterhead into your document; click insert; then explore quick parts (rectangle icon with boxes in it, we used this same menu to create autotext); then save the selection into quick parts library.

A pop up box will appear. This is the same pop up box that appeared when we were adding autotext entries. Here, you will enter the name of the quick part (say, “letterhead” or, outside this example, maybe “merger clause”); then save it to the quick parts gallery.

If you wanted to use this method to save your letterhead as a header, you can either use the same method above but save it in the header gallery, or you can go to Insert; header; the save selection to header gallery.

How to delete building blocks

If you want to remove building blocks that you’ve created, or clean up the building blocks that automatically came with Microsoft word, Click the insert tab; then explore quick parts; then click building blocks organizer; highlight the building block you want to remove and then click delete.

To modify a building block, open it and make your changes, then save over it.

I like to skip a small step to access my quick parts library. This is purely personal preference, but I find this easier than going through the insert menu every time I want to use a building block.  To do this, click on the file menu; then click options; then click on the quick access toolbar on the menu to the left. Highlight “explore quick parts menu” on large list to the left. Click add, then click ok.

IV.  Other Developer Tab Options

Forms are a great way to allow clients and coworkers to input data without editing the rest of a document. I like to use these for client questionnaires and workflow checklists, and many like to use forms to send order forms, form proposals that allow customers and clients to select options and autocalculate final quotes, or set letters for employees to complete and send. I also discovered a macro code for autofilling excel sheets with form field entries, but that is for another post.

After completing any one, or a combination of, the options below, click on the developer tab, then click restrict editing (the icon has a document with a picture of an old fashioned lock over it). Then, a menu will pop up on the right side of the document. The second option, titled editing restrictions will have a check box under it. Select this check box then, in that same second section, click on the dropdown menu and select filling in forms. Then, under option 3, click yes, start enforcing protection. A pop up box will appear where you can password protect the document, or just hit ok to bypass the password feature, or enter a password if you are so inclined.

Text Boxes

Otherwise known as form fields, this is a way to provide blank spaces for data entry without having to, for instance, type an underlined blank space that is then written over, deleted, or just plain in the way. You can also add prompts that disappear when a user starts typing, or highlights that direct a user’s attention to the blank space, then disappear when the user enters data.

Open the developer tab, then click legacy tools (icon looks like a toolbox). Click text form field.

If you would like to add a disappearing prompt, you can select the form field, right click and select “properties,” then enter the prompt in the box titled “default text.” You can also select the box, click design mode on the developer tab, then click inside the clear brackets and type your prompt here. Click design mode a second time to resume work on your document.

Create a menu that allows you to select between different quick parts options

This is useful in scenarios where you need to pick between different building block paragraphs that you’ve already added to your quick parts menu.

Open the developer tab, then click on building block gallery control (looks like 2 pages with arrows between them, right next to the Design Mode button); click on design mode; place the cursor where it says “choose a building block;” click on properties; give it a title (ex: type of case, or, here “what form is this”); select a gallery (usually you would use quick parts gallery); select the quick part sub-menu that corresponds with what options you would like to choose from; click on “choose a building block” and rename it; click on design mode to turn off design mode.

Drop Down Menus

Drop down menus allow a user to select different pre-determined options. Later on I will show you how to autopopulate other fields based on what option a user selects.

Open the developer tab, then click “drop down list content control.” Then click on design mode; place the cursor where it says “choose a building block;” click on properties; give it a title (ex: What type of pet does the client have?); click inside the drop down menu properties box; type the option you want to provide; click add; repeat as needed; click OK; turn off design mode (click on design mode button).

Check boxes:

Check boxes are easy to add and can be a very useful tool.

To add clickable check boxes next to text, open the developer tab, then place your cursor where you would like to add a check box. Then, click check box content control to place the check box within your document.

Step 2- Linking developer tab options: Dropdown that autopopulates dependent form fields using bookmarks

Ex:     [dropdown entries in “dropdown 1”]      and    [field 1]    will say the same thing.  Is this bookmarked? If yes, dropdown 1 will also populate here    [field 2]   after you make your dropdown 1 selection and hit tab.

  1. Place your cursor where you want the dropdown then open the developer tab. Click on “legacy tools,” then select “drop-down form field.”
  2. Right click on the dropdown field and select “properties.”
  3. A pop up window will appear. Enter whatever variables (things you want to be able to select in your dropdown) in the drop-down menu item to the left of the window and click add. Label the dropdown by typing “dropdown1” in the bookmark field, then click OK.
  4. Place the cursor where you would like the selected option repeated, then open the insert menu
  5. Click cross reference, then select bookmark in the “reference” dropdown.
  6. Click Bookmark text in the “insert reference to” menu
  7. Click the check box next to “insert as hyperlink”
  8. Select “dropdown1” in the “for which bookmark” menu, then click ok

IV. Macros

I discovered three things about macros. 1) finding out what they are and how to use them is like standing uncovered in the rain, then finding a secret pocket in your jacket that contains a hood 2) no one tells you how to use them 3) even if you hear about how to use them, it is extremely difficult to find the code you need without hours of study.

So, because macros have been a huge help to me but I have been frustrated by the lack of information available about how to use them, I decided to post something that I hope will become a repository for Visual Basic for Applications (“VBA”) code. (It may be hidden on a lawyer’s website, but I suppose it’s better than nothing) To that end, I turned on the comments section of this article so others can add VBA macro code they use and enjoy.

What is a macro?

Macros allow users to record keystrokes, commands, and changes to font styles or other edits, then asks word to insert those steps in order. The sequence of commands can then assigned to a keystroke.

What is VBA code?

You may not realize it, but if you are recording a macro you are actually writing VBA code. VBA code is the basic language for all Microsoft office programs, and its what happens behind the scenes while we type, click, highlight, give commands, or design documents. Recording macros allows a user to create and save VBA code without having to write the actual VBA code line by line. So, if you record a macro using the steps below, you can tell everyone you are writing code! (Well, sort of… we’ll get to actually writing code in a bit. In the meantime your secret is safe with me.)

What does this look like in practice? If, for instance, you are a lawyer that drafts a lot of contracts, you can assign “Alt M” to merger clause, “Alt S” to severability clause, “Alt A” for Arbitration- on and on until you can build contracts with just keystrokes. In my opinion building blocks or auto text are much easier to use, but you might tinker with macros and find different uses that suit your needs. You can also give each individual macro a button at the top of the tool bar if you don’t like using keyboard commands.

How to Start a Macro

Plan your keystrokes in advance- when recording macros you can’t right click!

Click on the developer tab; then, on the far left, click “record macro.”

A dialogue box will appear. You can pick between a macro hot key (select keyboard) or a button at the top of the tool bar (select button); *Note: the name of your macro can’t include spaces and must start with a letter!

When you complete your sequence click stop recording. You can also pause recordings

Important- when leaving Microsoft Word, a dialogue box will pop up that says “Changes have been made that affect the global template…” Hit save or all will be lost!

How to play your macro

Click on the developer tab; click macros (next to the Visual Basic option on the far left); then select what macro you would like to use; then click run.

Important – macros will not play in your average .doc or .docx format. So, after creating your macro using the steps above; click file; save as; then save as a macro enabled word document.

Create a button on the tool bar for your macro:

On the very top of the toolbar, click on the small downward pointing arrow (it is the last option on the top line of the ribbon behind save, back, and forward); then click on “more commands.” On the top left there is a dropdown that says “popular commands,” click on that option, then select Macros. Add it to the list on the right, then click modify and assign your macro a symbol if you want to make it distinctive from other macros, or rename it to something more user friendly.  I used to place a quick parts button on my tool bar and it saves a lot of time.

Create a keystroke for your macro:

Assigning frequently used clauses with a keystrokes has made contract drafting a snap, and I think it can help a lot of folks that cut and paste sentences, paragraphs, and more. Click on the same downward facing arrow on the top of your tool bar as above, then click “customize ribbon” on the far left menu. On the bottom left there is a “keyboard shortcuts” button- click it, then go to very bottom of the left hand menu and click “Macros.” Select the macro you want from the menu on the right; click “create new shortcut key” below, hold ALT and then the letter or letters you want to use (if it is currently assigned it will tell you); then click assign, close, then OK.

V.  Sample Macro Code

Ready to really impress your boss, clients, co-workers and, maybe, your friends? As I alluded to above, a user can also write VBA code to create macros. While this is a bit more difficult than using pre-set options, mastering VBA code will allow you to customize just about anything you want so long as you know the code.

But that’s the hard part- how do you learn how to write VBA code, and where are popular codes kept? For the sake of space I won’t get into writing code piece by piece, but I will show you how to enter it, and give you a few codes that I found particularly useful.

Where and how to write VBA code

Click on the developer tab, then click on the Visual Basic Editor icon on the far left. A large pop up box should appear on your screen. Click on the insert tab, then click on module. The second pop up box is where you enter VBA code and it is called the code window.

Examples of Code- what to write in the second pop up box

In total, a procedure is a named unit of VBA code designed to perform a specific function or functions. Functions can contain procedures and subprocedures. These procedures are written in strings, kind of like sentences, called statements.

These statements contain keywords that tell your computer what to do. A statement can also contain expressions that ask your computer to perform calculations by using operators. An operator can be an arithmetic operator ( +, - ); a logical operator (and, not, or); a comparison operator ( <, >, = ); and/or a concatenation operator (&, which joins two strings together)

Expressions can also use keywords, which are words that are defined in VBA language and provide your computer with specific directions.

I could go on to discuss arguments, objects, collections, properties… you can see that this can become complex in a hurry. I will supply code to you so you won’t have to get too far into the weeds. If you want to learn more, I suggest reading Mastering VBA for Microsoft Office by Richard Mansfield. It is a long read, but very thorough.[1]

Code that I’ve found particularly useful

A.    Auto-copy text

Example:

  [Text1]  will be the same as   [Text2] , which is exactly the same as   [Text3]  .

1.     Create a legacy text form field, enter “Text1” as a bookmark

2.     Create a second legacy text box, enter “Text2” as a bookmark

3.     Create a third legacy form text box, enter “Text3” as a bookmark

4.     Open the Visual Basic editor and enter the code below:

Sub CopyField()
Dim Temp As String
Temp = ActiveDocument.FormFields("Text1").Result
ActiveDocument.FormFields("Text2").Result = Temp
Temp = ActiveDocument.FormFields("Text1").Result
ActiveDocument.FormFields("Text3").Result = Temp
End Sub

5.     Click on the first form field, click properties in the developer tab, then under the “Run Macro On” section, in the dropdown under “Exit” select CopyField

6.     Restrict editing in the developer tab, click on the box in section 2 and then select “filling in forms” in the drop down menu. Then click “Yes, Start Enforcing Protection.”

7.     When the user selects an animal type the other fields will populate after clicking on one of the fields or pressing tab on the keyboard.

B.    Dependent Dropdowns:

Example:

Client Jane Doe has a pet CAT [dropdown 1] that she feeds FANCY FEAST [dropdown 2].
(The bracketed portions are dropdown boxes, the second populated with choices dependent on the results of the first)

1.     Select Developer tab; in the Controls group, click the Legacy Form dropdown and choose Drop-Down Form Field; repeat step again to add a second dropdown field.

2.     populate the first dropdown with type of pets as follows:

a.     Right-click the region dropdown field and choose Properties from the resulting submenu.
b.     In the Dropdown item control, enter Dog and click Add. Repeat to add Cat, Carrot, Hyena, and Shoe.
c.     In the Bookmark control, enter ddPetType. (No Spaces)
d.     Click OK.

3.     Next, right-click the Food Type dropdown field and name it ddFoodType (using the Bookmark control, as you just did to name the first dropdown ddPetType.) Click OK to close the dialog box.

At this point, you have one populated dropdown named ddPetType and a second dropdown named ddFoodType. ddFoodType is still empty. To populate ddFoodType add the VBA procedure below, as follows:

4.     Launch the Visual Basic Editor (VBE), which is on the far left of the Developer tab

5.     From the Insert menu, choose Module. (Screen will look like below)

6.     Enter the PopulateddFoodType sub procedure shown below.

Sub PopulateddFoodType()
Select Case ActiveDocument.FormFields("ddPetType").Result
Case "Cat"
With ActiveDocument.FormFields("ddFoodType").DropDown.ListEntries
.Clear
.Add "Fancy Feast"
.Add "Tuna"
End With
Case "Dog"
With ActiveDocument.FormFields("ddFoodType").DropDown.ListEntries
.Clear
.Add "Puppy Chow"
.Add "Kibbles and bits"
End With
Case "Parrot"
With ActiveDocument.FormFields("ddFoodType").DropDown.ListEntries
.Clear
.Add "seeds"
.Add "string cheese"
End With
End Select
End Sub

7.     Click Save on the Standard toolbar and then click Yes.

8.     Return to the Word document.

You're almost done. You need to tell the second dropdown to execute the new procedure you just added as follows:

9.     Right-click ddPetType and choose Properties. (Or, click Properties in the Controls group on the Developer tab.)

10.     From the Exit dropdown, choose PopulateddFoodType, then click OK.

Just one last step. Before using the fields, enable protection to use the drop down menu feature:

11.     Click the Developer tab and click Restrict Editing in the Protect Group.

12.     In the resulting task pane, click the Allow Only... option under 2. Editing Restrictions and choose Filling In Forms from that option's dropdown.

13.     Then, click Yes, Start Enforcing Protection under 3. Start Enforcement.

14.     Enter the same password twice, and click OK. You can also just hit enter without creating a password.

C.    Autopopulate multiple fields based on a dropdown selection

Auto-Fill Data Dependent on Drop Down using a Macro:

The   [select animal option in dropdown1] is named   [click here or hit tab to autopopulate name of animal in field1]   and is   [click here or hit tab to autopopulate animal’s temperament in field2]  .

1.   For the first field, create a legacy drop down form field and enter each option you would like to include in the dropdown

2.   Enter “Animal” in the space provided for bookmarks

3.   Add the second field by adding a legacy form field. Enter “Name” in the space provided for bookmarks

4.   Add the third field by adding a legacy form field. Enter “Disposition” in the space provided for bookmarks.

5.   Open the VBA edition and create a new module. Enter the code below:

Sub populatenameanddispo()
Select Case ActiveDocument.FormFields("Animal").Result
Case "Dog"
ActiveDocument.FormFields("Name").Result = "Rufus"
ActiveDocument.FormFields("Disposition").Result = "anxious"
Case "Cat"
ActiveDocument.FormFields("Name").Result = "Felix"
ActiveDocument.FormFields("Disposition").Result = "persnickety"
Case "Bird"
ActiveDocument.FormFields("Name").Result = "Larry"
ActiveDocument.FormFields("Disposition").Result = "competitive"
End Select
End Sub

6.  Click on the first dropdown (the dropdown labeled “Animal”) then click properties in the developer tab. Under the “Run Macro On” section, in the dropdown under “Exit” select populatenameanddispo.

7.  Restrict editing in the developer tab, click on the box in section 2 and then select “filling in forms” in the drop down menu. Then click “Yes, Start Enforcing Protection.”

8.  When the user selects an animal type the other fields will populate after clicking on one of the fields or pressing tab on the keyboard.

 

For the sake of space and time I won't add more codes, but please feel free to add your own time saving tricks and VBA codes in the comments section below. 

I hope this has been helpful, and if you have any questions please email me at andrew@andrewthompsonlaw.com.

[1]  Richard Mansfield, Mastering VBA for Microsoft Office 2010, (2010)

Andrew ThompsonComment