How to search and replace a Text String in a Word DOCX in Node.JS

npm install cloudmersive-convert-api-client --save
var CloudmersiveConvertApiClient = require('cloudmersive-convert-api-client');var defaultClient = CloudmersiveConvertApiClient.ApiClient.instance;// Configure API key authorization: Apikeyvar Apikey = defaultClient.authentications['Apikey'];Apikey.apiKey = 'YOUR API KEY';// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)//Apikey.apiKeyPrefix = 'Token';var apiInstance = new CloudmersiveConvertApiClient.EditDocumentApi();var reqConfig = new CloudmersiveConvertApiClient.ReplaceStringRequest(); // ReplaceStringRequest | Document string replacement configuration inputvar callback = function(error, data, response) {if (error) {console.error(error);} else {console.log('API called successfully. Returned data: ' + data);}};apiInstance.editDocumentDocxReplace(reqConfig, callback);

--

--

--

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

OAuth 2.0 Protocols Explained

5 Non-Conventional Ways to Improve Your Programming Now

Learn JavaScript functional programming from Avengers

Load balancing your NodeJS app with NGINX and PM2

How to encrypt, password-protect and set restricted permissions on a PDF in Node.JS

How to rotate all pages in a PDF document in Node.JS

LINKED LIST

How to Make the Loading Bar Disappear: A Complete Guide to Code Splitting in React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

Convert a Photo of a Document into Text using JavaScript

Automate tasks in node with node-cron

Keycloak Express Openid-client

How to create an API in Node JS and Mongo DB?