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:
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.