Document Properties / Metadata – Find And Replace
What are Microsoft Office Document Properties / Metadata?
Microsoft has a good page explaining document properties here
In this help file Document Properties and Metadata are used interchangeably.
Also note that track changes author / date are also treated as metadata for the purposes of this discussion.
Essentially, document properties are metadata stored within each Microsoft Office document that “travel” with the document. These properties can include company name, last date and time the document was modified and much much more.
To look at your document properties go to File -> Properties DropDown -> Advanced properties.
One very very important aspect of the office find and replace document property editor is the ability to replace custom property values. These come in very handy when you are creating Content Controls. You can read about it here
GOFR allows you to inspect ALL of your office documents located on a computer or file share, and look at all the different properties conveniently in one location.
Variables can be used in Metadata replacement, please read about variables and their use here
The Metadata Center screen
When you click on the “Find & Replace Metadata” button in step 3 of the main screen the “Metadata Center” screen opens.
If fewer than 200 documents are selected in step 2, the software looks at ALL of them and reads all metadata stored there. Note that you can cancel out of the read operation with the “CANCEL PROCESSING” button if you want, and still be able to do quick updates AND find replace operations.
With 200 documents or more the metadata is not read automatically, because this may take a few minutes. The “By MS Office Document” and “By MS Office Document Property” tabs then say “No data has been loaded” and have a “CLICK HERE” button that reads the metadata. Those two tabs are optional: if you know the value you need to replace, simply go to the “Find/Replace/Update Metadata” tab or use the “Quick Update” tab. Note that “CLICK HERE” also removes the find replace operations and quick updates you have entered so far, so read the metadata first.
You will be presented with 4 different tabs.
Quick Update
This is the simplest tab where you can quickly set some document properties without bothering with the complexities of finding and replacing. If you wish, this is the only screen you need! Simply fill in the property you want to set, such as for example the Company property, and click “Save And Close” at the top of the screen. This will set the operation to be performed on ALL the documents you selected in step 2 in the main screen of the program.
The properties you can set here are: Company, Author, Last Modified By, Manager, Title, Tags, Date Created, Date Modified, Categories, Status, Subject and Hyperlink Base.
- Note that if you want to erase the values, you MUST use the “Erase Metadata” button as described below. Leaving a field blank in this screen means you are not performing any action. See further discussion on this below.
- Note also that quick update behind the scene will insert a find replace operation using a regular expression to replace any value. You will see this in the log file after the operation is completed.
- You can also set the system date and time of the file to match the metadata date in the document! Set the Date Created and Date Modified, and check “Set windows system file date created to match metadata.” or “Set windows system file date modified to match metadata.” next to them. Windows explorer will show the modified date! You must pick the date before you can check the box.
By MS Office Document
Here you can browse thru all the files you selected in step 2, and by clicking on “Show Metadata” reveal ALL the metadata properties for that file. The property screen shows the property name and the “schema” that MS Office identifies these properties by. If you click “UPDATE” here, a new find and replace operation will be created in the “Find/Replace/Update Metadata” tab and you will be taken there to make the necessary changes.
“Hide properties with blank values” is checked by default; uncheck it to also see the properties that are empty in that file. Click “Return To Document List” to go back to the list of files.
By MS Office Document Property
Here you will see a list of unique property values with the number of documents each value is in. You can review all the values and click “Show Docs” to see all the files where they are located (“Return To Unique Property List” takes you back). Click “UPDATE” to create an entry in the “Find/Replace/Update Metadata” tab to find and replace that value.
Find/Replace/Update Metadata
This is where you will be making all the find and replace operations for the different values. Each row has:
- Delete – remove an entry from the find replace operation.
- Select Property – this is a drop down list of all the properties that are in your documents that you selected in step 2.
- Text To Find – enter text to find.
- OPT (next to Text To Find) – this will let you enable a regular expression or wild card in the text to find: choose “Text”, “WildCard” or “Regular Expressions”. This works the same way as it does in the text substitution, see Text Options. “Special Character” will also allow you to easily add a special character such as a Copyright (©) to the text to find.
- Text To Replace – enter the text you want to replace with.
- OPT (next to Text To Replace) – you can also enter a regular expression or wild card substitution AFTER the find operation is successful. This allows you to further manipulate the data. Please see our help topics on this subject. “Special Character” will also allow you to easily add a special character such as a Copyright (©) to the text to replace.
- Ignore Case – when checked, the case of the text is ignored, i.e. JoHn SmItH is considered equivalent to John Smith. This does not apply to regular expressions and wild card substitutions.
- Whole Word – when checked, the whole word must match for the substitution to take place. This does not apply to regular expressions and wild cards.
Notes
- Updating empty properties: unlike text substitutions, you can leave the text to find blank. This is important if you want to populate an empty property with a value. Simply leave the field blank and enter a value into the text to replace text box.
- Default MS OFFICE 2016 privacy settings: by default, starting with MS OFFICE 2016, the privacy setting in office documents does not allow you to save metadata with the office doc. When GOFR updates metadata this setting will be turned off to allow saving of the updated metadata. Please be aware that with this setting turned off all metadata will travel with the document and will be preserved.
- Just like in the text substitution, if you select a regular expression or a wild card substitution in the text to replace, you must also use a regular expression or a wild card in text to find. The program sets this for you when the text to find is plain text.
- If you select a regular expression or wild card, Ignore Case and Whole Word will be disabled as they have no bearing on regular expressions.
- Regular expressions are color coded in Green.
- Wild Card expressions are color coded in Yellow.
- Errors in regular expression or wild card entry are color coded in Pink.
- The trial version is limited to 2 document property changes at a time, and GOFR Lite to 5.
Erase Metadata
Further help on removing metadata is available here.
Clicking this button will insert all relevant regular expression entries (in the “Find/Replace/Update Metadata” tab) to erase all metadata from your documents, and take you to that tab. The entries replace the find replace operations and quick updates that were entered before. After processing all the documents in the main screen these entries will remove ALL metadata fields except date fields. Date fields must be handled very carefully, and may not be automatically removed with regular expressions. To remove a date field, update it in the “By MS Office Document” tab and follow the date format to update it.
Date fields have the UTC format as follows (example):
2017-06-19T15:09:00Z
Make sure to enter the date in the above format.
ADD ANOTHER FIND REPLACE OPERATION
This button is only available in the “Find/Replace/Update Metadata” tab.
This button creates a new row to allow a new find replace operation on metadata.
LOAD FROM EXCEL OR CSV TEMPLATE
This button is only available in the “Find/Replace/Update Metadata” tab.
This button will allow you to load your substitutions from an excel spreadsheet (.xlsx) or a .csv file. Export to CSV first, and use that file as a starting point for your entries. See Upload Document Properties / Metadata substitutions from an EXCEL/CSV template.
EXPORT TO CSV
This button is only available in the “Find/Replace/Update Metadata” tab.
Export your document property / metadata operations to a csv file.
CLEAR
Removes all metadata find replace operations and quick updates, and reads the metadata from your documents again.
Export Metadata to csv
Use this convenient button to export ALL metadata to a csv file which can be opened in Excel. The file has one line per document and property with the columns File, Property and Value, and it is opened when the export is finished. You can see ALL of your metadata here as well as in the different tabs in this screen.
If the metadata has not been read yet (200 documents or more), it is read first. As with “CLICK HERE”, this removes the find replace operations and quick updates entered so far.
Save And Close
Click “Save And Close” when done. Then go back to the main screen, select the output in step 4 and click “Perform Substitutions or Extractions”.