Copy all styles from the source document to the target document

Copies all styles from the source document to the target document.

Copy all styles from the source document to the target document REST API

Server Method Endpoint
https://api.aspose.cloud/v4.0 PUT /words/{name}/styles/copy_from

, where:

  • name (required) — the filename of the target document.

You can use the following parameters in a REST request:

Parameter Name Data Type Required/Optional Description
templateName string Required The filename of the origin document.
folder string Optional Original document folder.
storage string Optional Original document storage.
loadEncoding string Optional Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
password string Optional Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
encryptedPassword string Optional Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
destFileName string Optional Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
revisionAuthor string Optional Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
revisionDateTime string Optional The date and time to use for revisions.

Copy all styles from the source document to the target document usage examples

Let’s look at practical examples of using the web service. You can do this both with cURL and Postman utilities, and from your code in various programming languages: Python, Java, JavaScript, C#, PHP, C++, Go, Ruby, Swift, Dart.

How to copy all styles from the source document to the target document with cURL or Postman

One of the easiest and fastest ways to call a REST API is to use cURL or Postman:

How to copy all styles from the source document to the target document in Python, Java, C#, C++, JavaScript and other programming languages

Using SDK is the quickest way to speed up the development. Please take a look at the provided code examples to quickly call this web service from your favourite programming language:

See Also

  • GitHub repository — explore Aspose.Words Cloud SDK Family. These software libraries take care of all low-level document-processing details.