Too-Much-Info

Word Macros for Document Assembly: The Data-Gathering Problem

Document Services

Word Macros, which can be divided into two groups—simple keystroke macros and conditional macros, or Visual Basic for Applications—are powerful extensions to MS Word; however, Word Macros are frequently used to build document assembly templates, a task for which Word Macros are not well suited.

I’ve written several blog posts on this topic lately, and I’ll probably write several more before I’m through, primarily because enterprises need to be headed off at the pass, so to speak, before they chase Word Macros too far down a dead end path.

One of the key problems with Word Macros for document assembly has to do with data gathering. Document assembly, an ideology and technology that can be traced back to a research project at the Brigham Young University Law School in the mid-1970s, begins with the automating of a text-based document or graphical PDF form. This automation process involves building scripting logic (business rules) into the document or form. A practitioner simply begins reading through the form, and when he/she encounters some aspect of the form that could be automated, he/she employs some functionality of the automation software to embed logic into the document. For example, maybe the practitioner comes across a clause which should only be included in a contract if several conditions exist. The practitioner could encase the clause in an IF statement that defined all the conditions, in the process creating all the necessary variables.

Now there are two points to be made here. First, VBA, a powerful platform in its own right, simply isn’t designed specifically for document assembly, and, consequently, doesn’t include all of the scripting tools necessary to quickly build logic into the document. In many cases, you may be able to build your own utilities to bridge the gap, but YIKES! Talk about reinventing the wheel, and in the end, not doing a very good job of it.

But the real problems with VBA for document assembly won’t be exposed until you get to the next phase of the process—building information-gathering dialogues to collect all the necessary data to assemble a custom version of the document. In other words, with VBA, you’ll need to manually program a window containing a question for each variable that you used to automate the document. For a document with just a couple of questions, this reality may be tolerable, but when you get to something really sophisticated—a complex contract, say, with hundreds of discreet variables—building the information-gathering windows will become a major problem. And even after you do, you’ll find that all the work you’ve done in VBA still hasn’t yielded a very user-friendly product.

Contrast VBA with HotDocs, for example– the most powerful of the document assembly RAD (Rapid Application Development) platforms and the eventual byproduct of that BYU research project back in the 1970s. HotDocs not only has all the tools readily available to quickly do all the document scripting you’ll ever need, but it will automatically create a question for each variable you build into the document. Furthermore, HotDocs will allow you to easily group related questions into the same window and build automation characteristics into the interview itself. For example, you may not want a particular group of questions to even be presented in the interview at all unless certain conditions exist.

Additionally, HotDocs allows you to build safeguards into the interview, such as numeric and date range validations and individual help screens for specific questions. One of the most powerful features of HotDocs interviews is the ability to allow end users to move backward and forward within an interview to enter and edit answers. This mobility within an interview is critical for enterprise-grade document assembly but not even possible with VBA, at least, without an unacceptable amount of coding.

As I’ve said in multiple blog posts, VBA is powerful medicine and enables practitioners to dramatically extend the functionality of MS Office products. However, it’s just not designed for document assembly, and consequently, falls far short of a dedicated RAD platform, such as HotDocs.