The Word API's Inspect Document feature can inspect and delete the following information (hereinafter "meta information") of files created in Microsoft Word:
You can set the document property information shown in the red frame and the personal information shown in the blue frame for a Microsoft Word document by following two steps:
The default settings in Microsoft Word automatically set the "Last Modified" date and "Created" date for property information and the "Author" and "Last Modified By" for personal information.
In Microsoft Word, you can set "hidden text," which are text decorations that are "displayed on the screen" but "not displayed when printing or exporting to PDF".
The "displayed on screen" can also be switched as shown in the figure below by validating/invalidating "Show/hide Editing Marks".
Here is an example of Microsoft Word and Word API "Inspect Document" for a document with meta information set.
In Microsoft Word, you can check the inspection results in the target file by going to [File]-[Info]-[Check for Issues]-[Inspect Document].
Since meta information is set in the document, a warning will be displayed as shown in the figure below.
The Word API can also check meta information in the same way.
Except for the command line interface, it returns "inspect document" results.
Class | Descriptions |
---|---|
InspectDocumentResult |
This class handles the results of "inspect document" and has the following member variables: DocumentProperties: "true" if property information exists. PersonalInformation: "true" if personal information exists. HiddenTextt: "true" if hidden text exists. |
The command line interface displays the "inspect document" results.
Because meta information is set in the document, it displays that each meta information is set as shown in figure below.
For documents with meta information set, here is an example of removing meta information in Microsoft Word and the Word API.
In Microsoft Word, target meta information can be removed by selecting "Remove All" in the "Inspect Document" results dialog.
The following figure shows an example of removing property information and personal information.
The Word API can also remove meta information in the same way.
Except for the command line interface, specify the following options for removing meta information.
In the command line interface, specify the parameters for removing meta information.
Class | Descriptions |
---|---|
InspectDocumentRemoveOptions |
This class handles options for target of removing in "inspect document" and has the following member variables: RemoveDocumentProperties: "true" if removing property information. RemovePersonalInformation: "true" if removing personal information. RemoveHiddenText: "true" if removing hidden text. |
The following figure shows an example of property information and personal information removed.
[Install directory]/samples/templates/Inspect_document.zip contains sample files for setting meta information and hidden text.