Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Search For Values in an Excel Worksheet?

(image) Hey, Scripting Guy! How can I use Excel’s Find method to search for values within a worksheet?-- SK(image) (image) (image) Hey, SK. Before we begin today, we have a question for you, and for everyone else out there in Scripting Land. Back when the Scripting Guys first started planning the 2008 Winter Scripting Games (February ...

Hey, Scripting Guy! How Can I Extract Specific Information From a Word Document and Then Use That Information to Rename the Document?

(image) Hey, Scripting Guy! I have a bunch of Word documents in a folder. I need to open each document, read in some information from the first two lines, then use that information to rename the file. However, I’m having some trouble getting this to work. Can you help me?-- TG(image) (image) (image) Hey, TG. As devoted readers of Hey, ...

Hey, Scripting Guy! How Can I Add a Record to a Database Using Windows PowerShell?

(image) Hey, Scripting Guy! Awhile back you showed us how we could use Windows PowerShell to retrieve data from a Microsoft Access database. I’m now trying to add data to a database using PowerShell, but I can’t get the script to work. Any chance you could show me how to add a record to a database using Windows PowerShell?-- AB(image) (...

Hey, Scripting Guy! How Can I Tally All the Items in a Microsoft Word Document?

(image) Hey, Scripting Guy! We have an application that repeatedly runs a test and writes the result of each test pass to a Microsoft Word document. Periodically I’d like to be able to use a script to tally up the number of times a test passed, the number of times a test failed, and the number of times a test failed to run. How can I write...

Hey, Scripting Guy! How Can I Reset the Revision Number of a Word Document to 1?

(image) Hey, Scripting Guy! How can I reset the revision number of a Microsoft Word document back to 1?-- JL(image) (image) (image) Hey, JL. You know, a lot of people think the Scripting Guys have lost their edge. “You guys used to write all these crazy scripts that used all these weird and wacky workarounds in order to solve problems...