Scripting Blog [archived]

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

How Can I Retrieve Field Values in a Microsoft Word Document?

(image) Hey, Scripting Guy! I have a bunch of Word documents that include fields like LastSavedBy. How can I write a script that retrieves the current values for these fields?-- OS(image) (image) (image) Hey, OS. You know, the other night the Scripting Guy who writes this column was watching TV when he saw an ad for a new Monopoly game: ...

How Can I Retrieve IP Addresses (and Only IP Addresses) From a Text File?

(image) Hey, Scripting Guy! I have a script that uses Netsh.exe to return information from my DHCP servers; all that information is then written to a text file. That works great, except that I need to be able to parse the data and pull out any IP addresses included in that information. How can I write a script that extracts just the IP ...

How Can I Create a New Folder in Microsoft Outlook?

(image) Hey, Scripting Guy! How can I create a new folder in Microsoft Outlook?-- TY(image) (image) (image) Hey, TY. You know, this is an exciting time here at Microsoft; after all, last night at midnight we officially released one of the most highly-anticipated software products ever created: a script that can create a new folder in ...

How Can I Allow Users to Type Text Into an HTA Table?

(image) Hey, Scripting Guy! I’m using an HTA as a data entry online form. The easiest way for me to format the HTA is to use a table; however, I can’t figure out how to let people type text into some of the cells in that table. How can I do that?-- EN(image) (image) (image) Hey, EN. You know, Saturday night the Scripting Guy who writes...

How Can I Change the Paragraph Case in Microsoft Word?

(image) Hey, Scripting Guy! We have a bunch of Word documents that, for some reason, have been formatted using nothing but lowercase letters. We know exactly how we want to reformat these documents: all the headings (which are in 14-point type) should be in title case and all the other paragraphs should be in sentence case. Of course, it’s...