PowerTip: Use PowerShell to Find Title of Foreground Word Document

The Scripting Guys

Dr Scripto

Summary: Use Windows PowerShell to find the title of the foreground Word document.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the title of the Word document that is currently in the foreground when 
           I have several documents open?

Hey, Scripting Guy! Answer The Get-Process cmdlet with the MainWindowTitle property will list the title of the Word document.
           This example presents the main window title and the start time of the application:

Get-Process winword | select starttime, MainWindowTitle

The Scripting Guys
Dr Scripto

Follow Dr Scripto   

No Comments.