![change document properties word 2016 change document properties word 2016](https://www.top-password.com/blog/wp-content/uploads/2018/06/word-2016-options.png)
If not, click “Info” at the top of the list of items on the left. To access the dialog box that allows you to change the properties for the currently open document, click the “File” tab.īy default, the “Info” screen should display. NOTE: We used Word 2013 to illustrate this feature. Some of these are displayed on the “Info” screen and you can change these properties. Word also stores several additional advanced properties related to your documents.
Change document properties word 2016 how to#
Until then, peace.We recently showed you how to set the user information in Word. If you have any questions, send email to me at or post your questions on the Official Scripting Guys Forum. I invite you to follow me on Twitter and Facebook. Join me tomorrow when I will talk about programmatically assigning values to the Word documents. The complete Get-SpecificDocumentProperties.ps1 script is on the Scripting Guys Script Repository. HSG-7-24-12.docx 1035 edwils guest blogger, powershell , “number of words”, author, keywords | ft -AutoSize invokemember(“value”,$binding::GetProperty,$null,$pn,$null)
![change document properties word 2016 change document properties word 2016](https://s3-eu-central-1.amazonaws.com/digiblog/app/20190123101427/bibliographie.png)
invokemember(“item”,$binding::GetProperty,$null,$BuiltinProperties,$p) I use Write-Host for this so I can specify the color (blue).
![change document properties word 2016 change document properties word 2016](https://www.howtogeek.com/wp-content/uploads/2015/05/02_make_sure_info_screen_is_active.png)
If an error occurs, I print a message via Write-Host that the value was not found. Both the name and the value of the built-in document properties are assigned to the hash table as a keyvalue pair. I already know the name of the property that I desire to obtain therefore, I use it directly when obtaining the value of the property. I use Try when attempting to access each built-in property because an error generates if the property contains no value. To do this, once again I use a foreach statement. $objHash = is time to work through the array of built in properties that I selected earlier. $BuiltinProperties = $document.BuiltInDocumentProperties I also create a hash table that I will use to create the custom object later in the script. Inside the foreach loop, I open each document,and return the BuiltInDocumentProperties collection. Now I need to walk through the collection of documents. $docs = Get-childitem -path $Path -Recurse -Include $include $application = New-Object -ComObject word.application $include = “Title”,”Author”,”Keywords”, “Number of words”, “Number of pages” This portion of the script is shown here. Finally, I obtain a collection of fileinfo objects and store the returned objects in the $docs variable. The reason for creating WdSaveOptions is to keep Word from modifying the last save option on the Word files. Next, I need to create BindingFlags and WdSaveOptions. Next, I create the Word.Application object and set it to be invisible. This permits changing the path to search, as well as modifying the include filter that is used by the Get-ChildItem cmdlet. The first thing I do is create a couple of command-line parameters. You should refer to those blogs for additional information. It is very difficult to work with Word document properties, and I have written several blogs about this. This is a great benefit because it permits further analysis and processing of the data-and it would even permit export to a CSV file if I wish. This script also accomplishes a few of the things I wanted to do in yesterday’s script that I did not get a chance to do-namely, I return a custom object that contains the built-in properties I choose. Today’s script is similar to the Find All Word Documents that Contain a Specific Phrase script from yesterday, so reviewing that posting would be a good thing to do.
![change document properties word 2016 change document properties word 2016](https://codedocu.com/Daten/Images/2/Image_1649_1.jpg)