
- #Add custom document properties word 2016 how to#
- #Add custom document properties word 2016 windows#
In reality, this could be a Get-ChildItem cmdlet that filters all of the document files, in the same manner that was used in yesterday’s Excel article. JB, the first thing to do is to assign the path to the document. “Delete”, $binding::InvokeMethod,$null,$propertyObject,$null) “Item”, $binding::GetProperty,$null,$customProperties,$CustomProperty) $propertyObject = $typeCustomProperties.InvokeMember(` “add”, $binding::InvokeMethod,$null,$customProperties,$arrayArgs) | $arrayArgs = $CustomProperty,$false, 4, $Value $typeCustomProperties = $customProperties.GetType() $customProperties = $document.CustomDocumentProperties $application = New-Object -ComObject word.application The complete Set-WordCustomProperties.ps1 script is seen here. You should refer to the Hey, Scripting Guy! post you mentioned in your e-mail message for information about working with custom properties in Microsoft Word, as well as for additional information about working with the InvokeMember method.

JB, I decided to write the Set-WordCustomProperties.ps1 script for you to allow you to set custom properties on a Microsoft Word document. Thinking of Jit reminded me of some of the pictures I took during that trip, such as the following one that was taken in downtown Brisbane. He was the Microsoft guy that I was to train to deliver my class and I got to work with him for two weeks-one week in Brisbane and one in Sydney. I first met Jit several years ago in Brisbane, Australia, when I went there to teach a VBScript class that was based upon one of my VBScript books. I knew it was Jit because I recognized his e-mail address. She took her laptop with her and muttered something about me being “impossible at times”-as if she weren’t alive in the 1970s or something.Īnyway, as I was reviewing the e-mail inbox, I ran across Jit’s message. She evacuated the upstairs about the time that Sunshine of Your Love came on, and she was long gone by the time Badge was playing. I have no idea where the Scripting Wife is right now. I have Cream cranked up so loud on my Zune HD that I can feel the energetic Jack Bruce bass licks deep inside my bones, and therefore I am sipping, munching, and grooving as I review the e-mail sent to the address. I was able to score some Tim Tams from my friend Brent in Sydney recently while he was in the United States for the Microsoft TechReady conference in Seattle, Washington, so things are progressing nicely this morning. I am sipping a cup of English Breakfast tea with a little lemon grass and a stick of cinnamon in it. I am wondering if you would care to tackle that task now?
#Add custom document properties word 2016 how to#
You, however, did not show how to modify the value of custom properties.

#Add custom document properties word 2016 windows#
The post illustrated how to use Windows PowerShell to read the custom properties from Microsoft Word documents. First I’ll show you how to add it the traditional way, followed by creating a quick access button.Hey, Scripting Guy! A few months ago, you wrote a really cool Hey, Scripting Guy! post, How Can I Retrieve the Custom Properties of a Microsoft Word Document.

Being able to ‘file’ the document at the time of creation and editing is very valuable and often the ‘Information Panel’ won’t ‘be there’ in Word. I’m a big fan of organizing data by meta information (columns), instead of folders wherever possible. This gets asked enough it seemed worthy of a quick blog.
