Scripting Blog [archived]

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

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 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...

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) (...