Why Word Hacks?Hacking has a bad reputation in the press. They use the term hackers to refer to people who break into systems or wreak havoc with computers as their weapons. Among people who write code, though, the term hack refers to a "quick-and-dirty" solution to a problem, or a clever way to get something done. And the term hacker is meant very much as a compliment, referring to someone as being creative, or having the technical chops to get things done. The Hacks series is an attempt to reclaim the word, document the good ways people are hacking, and pass the hacker ethic of creative participation on to the uninitiated. Seeing how others approach systems and problems is often the quickest way to learn about a new technology.Word Hacks is about solving problems. That may mean automating repetitive tasks, adding sorely needed features, rearranging menus and toolbars, and even controlling Word from another program. Word is used by millions of people every day, and 100 hacks can't possibly cover all the problems those users will face. So this book is also about giving you the tools and the inspiration to hack solutions for your own unique Word problems. While you'll find beginning, intermediate, and advanced hacks between the covers, this book is not an exhaustive treatment of everything you can do with Microsoft Word.You can use most of the hacks in this book even if you know nothing about VBA. But truly hacking Word means using VBA, and the dozens of macros in this book, ranging from simple to very complex, may even help you learn a bit of VBA.When creating VBA macros for this book, I chose to use readable rather than more robust code. If you plan to use these macros in a business or production environment, you should include sufficient error handling and data validation. In many cases, I also sacrificed performance for readability. For most Word users, and most Word documents, the difference is negligible. However, if you work with long documents, you might find more efficientbut more complexways to perform many of these hacks. For tips on improving the performance of your VBA code, see [Hack #64] in Chapter 7. |