Read & Write MS Office custom properties with PowerShell

While working on automating Microsoft Word I needed to read and write custom properties in documents. I found several resources out there. Reading worked fine, but when writing custom properties they all crashed. I finally managed to fix it though, and though I’d share my solution.

I compiled cmdlets for reading and writing both built-in and custom properties. The cmdlets are generic and work with Word, Excel and PowerPoint. Here is an example how to use with Word :


Here is the full script (also available on my GitHub):


This entry was posted in Development, Tutorials and tagged , , , , , , . Bookmark the permalink.

One Response to Read & Write MS Office custom properties with PowerShell

  1. aden says:

    Amazing! i’ve been trying to figure it out as well!
    Found lots of resources that could read but writing failed with exception errors

    Thank you, Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *