WordUtils

WordUtils (ODC)

Stable version 0.1.17 (Compatible with ODC)
Uploaded on 24 September 2024 by Product League
WordUtils

WordUtils (ODC)

Documentation
0.1.17

1. Install the latest component version

Check the OutSystems Forge for the WordUtils component and ensure that the latest version is installed in your environment.


2. Manage your dependencies

Add a desired dependency in your application or library from the WordUtils through manage dependencies and choose the the Server Actions for your use-case:




3. Using the public Server Actions

The following Server Actions are available to be consumed:

  • searchReplaceValues: Action that finds and replaces the content of the given Word document.
    • WordDocument [Binary Data]: The original Word document.
    • Keywords [Keywords List]: The list that contains the key-value pairs to be replaced.


  • getHTML: Action that receives a Word document (only .docx format is accepted) and return its content in HTML format.

    • WordDocument [Binary Data]: The original Word document.


4. Setup the Word document template

The word document used to replace the keywords must contains the keywords inside double curly brackets. For instance, if i want to replace the keyword OutSystems11 with the value ODC the keyword inside the document should be defined as {{OutSystems11}} inside the Word document. The replacement will be done removing the curly brackets.