Create template based Word documents.


Based on:
https://github.com/open-xml-templating/docxtemplater


Help:
https://docxtemplater.readthedocs.io/en/v3.25.4/tag_types.html

Description:

The neoWord plugin for VisualNEO Web is a powerful tool that enables users to generate customized Microsoft Word (.docx) documents by populating templates with dynamic data. This plugin utilizes the Docxtemplater library to simplify document creation, allowing developers to merge Word template files with specific data variables. Here are key features and possibilities with neoWord:

  • Template-Based Document Creation: Users can create Word templates in software like Microsoft Word or any compatible tool that saves files in the .docx format. The templates can include placeholders that dynamically populate based on data inputs, enabling batch document creation or customized document generation from within VisualNEO Web apps.
  • Data Insertion and Formatting: With neoWord, users define variables in a JSON format, which are then inserted into the Word template. For example, using a template with {name} will insert the name value defined in the data JSON, replacing it with a specific name like “John.” This process supports customization at a fine level within the text, ensuring personalized content.
  • Conditional Content: The plugin supports conditional tags, allowing sections of the document to be shown or hidden based on the provided data. For instance, a template can include {#hasDog}Dog’s name: {dog}{/hasDog}, which only renders if the hasDog variable is true, making it useful for tailoring document content based on varied data inputs.
  • Sections and Looping: The neoWord plugin also enables looping structures within templates, such as displaying a list of items or details for each entry in a dataset. For instance, {#products}{name} {price} €/products} loops through product names and prices, outputting each item in the final document.
  • Advanced XML and Raw Content Support: For complex formatting, such as tables or specific layouts, the neoWord plugin allows the insertion of raw XML, providing more granular control over document formatting. This flexibility is useful for generating complex documents that adhere to specific visual standards.

By integrating neoWord, developers using VisualNEO Web can automate document generation, enhancing the app’s ability to output professional and personalized Word documents, such as reports, letters, or invoices, directly from app data

neoWordGenerate

Purpose:

Generate a .docx Word document from a .docx template file. Help:
https://docxtemplater.readthedocs.io/en/v3.25.4/tag_types.html

Category:

neoWord

Syntax:

neoWordGenerate "fileName" renderObject "outFileName"

 

fileName

Template file name (ie: mydocument.docx)

renderObject

Render object variable name

outFileName

Final file name (ie: mydocument.docx)


neoWordGenerateReplaceImage

Purpose:

Generate a .docx Word document from a .docx template file replacing an image previously present in the template file.

Category:

neoWord

Syntax:

neoWordGenerateReplaceImage "fileName" renderObject "outFileName" "imageName" "base64Data"

 

fileName

Template file name (ie: mydocument.docx)

renderObject

Render object variable name

outFileName

Final file name (ie: mydocument.docx)

imageName

Array of placeholder image names

base64Data

Array of base64 encoded image data

 

neoWordGenerateReplaceImages

Purpose:

Generate a .docx Word document from a .docx template file replacing an Array of images previously present in the template file.

Category:

neoWord

Syntax:

neoWordGenerateReplaceImages "fileName" renderObject "outFileName" [imageNames] [base64DataArray]

 

fileName

Template file name (ie: mydocument.docx)

renderObject

Render object variable name

outFileName

Final file name (ie: mydocument.docx)

imageNames

Array of placeholder image names

base64DataArray

Array of base64 encoded image data

Created with the Personal Edition of HelpNDoc: Streamline Your Documentation Creation with a Help Authoring Tool