Extract Metadata from Word Document with NET REST API

This article describes how to extract metadata from Word document with NET REST API. You will learn to automatically read the Word DOC metadata with C# Low Code API using the .NET cloud SDK. This code does not require any third-party tool or software to retrieve the information.

Prerequisite

Steps to Fetch Document Properties in Word with C# REST API

  1. Instantiate the Configuration object by setting the ClientId and ClientSecret
  2. Create the WordsApi class object using the Configuration object
  3. Read the input Word file into a byte array
  4. Create the GetDocumentPropertiesOnlineRequest request object for reading the metadata
  5. Invoke the GetDocumentPropertiesOnline() method to fetch the properties
  6. Parse through all the properties in the API response and display the information

These steps define the process of developing a Word DOC metadata viewer with C# REST API. Instantiate the WordsApi object with the client ID followed by reading the input Word document into a byte array. Finally, create the request object using the GetDocumentPropertiesOnlineRequest class and use it to fetch the document properties with the GetDocumentPropertiesOnline() method.

Code to Read Microsoft Word Properties with C# REST API

This sample code exhibits how to develop a Word metadata viewer with C# Low Code API. The result object contains a collection of document properties containing property names, and value pairs. If your source Word file is password protected, provide the password in the request object.

This article has taught us the development of the Word document metadata viewer with NET REST API. If you want to change the properties of a Word file, refer to the following article: Change properties of Word document with NET REST API.

 English