Skip to main content »

What is a VB Document (Visual Basic Document)?


A VB document (Visual Basic Document)is an MS Word document that has been automated withVisual Basic for Applications. In other words, aVB Document (Visual Basic document)is an automated template that will generate custom versions of a Word document based on unique answers or facts. A more common term for aVB documentwould be adocument automationtemplate or adocument assemblytemplate.

While Visual Basic for Applications (VBA) is capable of building document automation templates, there is a long list of reasons why VBA is not a great choice for this type of programming, not the least of which is its intended purpose as a general RAD (Rapid Application Development) platform.Put another way, VBA doesn’t include document-automation-specific capability that is essential for enterprise-grade document automation.

For example, let’s say you want to automate the inclusion of correct pronouns that refer to one of the parties in a contract, say the lessee in a lease contract. After writing the specific scripts necessary for this task throughout theVisual Basic document,you would then need to go back and write code necessary to generate a question: What is the lessee’s gender?For a single question, this reality may not seem daunting, but for a contract requiring hundreds of discreet data items, custom coding the Q/A interview would represent substantial work that would not be necessary in a true document automation RAD platform, such as HotDocs, which automatically generates a question for each variable in a document template. Beyond basic information-gathering functionality, VBA has no internal system for saving and managing answer files.

VBA also lacks many basic scripting features that are commonly needed in the automation of documents.Nested repeat loops, functions necessary for correctly punctuating assembled text, and tri-state logic (the ability to test for unanswered questions in Boolean expressions) are all critical to effectively automating the generation of documents, but are all missing in VBA.VBA doesn’t allow for shared component files among templates, nor does it allow for multi-platform deployment of templates. In other words, a VBA template won’t seamlessly run in a browser, a luxury that HotDocs users have long taken for granted.

I’m, of course, just scratching the surface, but you get the idea. If you happen to have a small handful of simple documents that you want to automate, VBA may work for you. But if your business is heavily dependent on document generation, if your documents have real complexity, and if you don’t happen to have a small army of software engineers sitting around with nothing to do, then VBA is simply the wrong choice.

Share this article