Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Remove Unwanted Tabs From a Text File?

(image) Hey, scripting Guy! I have about 5,000 text files that have unwanted tabs at the end of each line. How can I write a script that removes these unwanted tabs?-- TT(image) (image) (image) Note. If this looks – and sounds – a little different than the typical Hey, Scripting Guy! column, well, there’s a good reason for that...

Hey, Scripting Guy! How Can I Save the Attachments for All My New Office Outlook Messages?

(image) Hey, Scripting Guy! I’ve been testing your script for saving all the attachments in your Outlook Inbox, and it works great. However, I have a question: is it possible to get this script to run only against new emails?-- CN(image) (image) (image) Hey, CN. Welcome to today’s Hey, Scripting Guy! column, brought to you on-location ...

Hey, Scripting Guy! How Can I Convert an Extension Number to an Actual Phone Number?

(image) Our phone numbers are stored in Active Directory as extension numbers; however, we have a set of rules for converting those extensions to actual phone numbers. I’m writing a script to create an Outlook signature, but in that script I need to be able to convert an extension to a phone number. How do I do that?-- SM(image) (image) (...

Hey, Scripting Guy! How Can I Retrieve the Field Size and a Sample Record For All the Tables and Fields in an Office Access Database?

(image) I recently read an article of yours that showed me how I can retrieve the names of all the tables in an Access database, along with a list of all the fields in each table and the data type of each of those fields. That’s a really useful script, but it would be even more useful if it could list the field size and also display a ...

Hey, Scripting Guy! How Can I Automatically Move the Focus as Users Type in an HTA?

(image) I have an HTA that we use for creating and modifying user accounts. In that HTA we have a couple of phone number fields; each of these fields consists of three text boxes (one for the area code and two for the phone number). I’d like to set this up so that, as soon as someone has typed three digits into the area code box the cursor...