What is VBA for Word?
VBA for Word is a term used specifically in reference to the concept of building document automation (document assembly) characteristics into MS Word documents. While VBA in general is a powerful technology and provides a substantial extension to the MS Office suite, VBA for Word, at least in regard to document automation (document assembly), is not the best approach for any enterprise requiring any level of sophistication in its document automation templates.
There is a long list of reasons why VBA for Word is not a great choice for this type of programming, and at the top of the list is its intended purpose as a general RAD (Rapid Application Development) platform.Put another way, VBA doesn’t include the document-assembly-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 the Word 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.