Little in this world is black and white, so why should your VBScript output reports be? Until recently, almost all my VBScript scripts created reports that were the standard black text on a white background. Then I learned how easy it is to spice up these reports with a little color. Now, I'll show you how.
Before I start, though, let me say that there's a practical side to coloring your VBScript world. Let's say you're writing a script to produce a spreadsheet that exposes Administrator accounts with non-expiring passwords or you're comparing this week's administrator IDs in the Domain Admins group with those in last week's report. In these cases, you'd probably want to highlight the data that needs immediate attention. Or suppose you're using a VBScript script to produce an inventory report that upper management has requested about specific servers. Adding a colored title will make that report more pronounced.
Figure 1 shows an HTML Application (HTA) that lets you click buttons to run demos showing how you can add color to not only VBScript reports but also HTA reports. This HTA also provides a way for you to enter color values and see the results. You'll find the code for the HTA in the AddColor.hta file, which you can download from the Windows Scripting Solutions Web site. Go to http://www.windowsitpro.com/windowsscripting, enter 47800.zip in the InstantDoc ID text box, then click the 47800.zip hotlink. . . .