Tuesday, November 24, 2015

PowerShell & Microsoft Word 2016 : Enabling / Disabling display of recent files in Word 2016 using PowerShell.

 

In the previous blog post, we have seem that how can we show Word Clipboard using PowerShell.

Now, the things are getting heated . Now my next task is to enable and disable the display of recent files in the Word 2016.

Crazy! No!

But, I manage to do it.

By default, Word 2016, show you the list of Recent files. I am task to make it off using PowerShell.

before disabled

And I manage to do this, by using.....

$word.DisplayRecentFiles = $false ; 

Simple and Cool no!

In the below screenshot you can see that, there is no recently opened files.

recent-disabled

The complete code is .

$word = New-Object -ComObject "Word.Application"

$word.Visible = $true

$word.DisplayRecentFiles = $false ; 

 

:)  hell Yah!

 

Note : The above only works if you open Word document using code, if you open word separately, you will see the recent files.

 

Aman Dhally - Manya Kaur

With Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.