Scripting Blog

A place to learn about PowerShell and share stories of automation

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

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 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: Monopoly, the Electronic Banking ...

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

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

How Can I Create a New Folder in Microsoft Outlook?

Hey, Scripting Guy! How can I create a new folder in Microsoft Outlook?-- TY 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 Microsoft Outlook! Oh, wait; sorry. ...

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

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 Hey, EN. You know, Saturday night the Scripting Guy who writes this column was watching the ...

How Can I Change the Paragraph Case in Microsoft Word?

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

Feedback usabilla icon