Word Create (Session)
Word Create (Session)
Section titled “Word Create (Session)”Type: word-create · Package: Word Activities v1.0.0 · Output: ZoanWordSession
Create a .docx document new and empty and return a session to fill it with paragraphs, tables and images. It is the starting point to generate documents from the bot: letters, reports, minutes, contracts.
How it works
Section titled “How it works”Create the document at path path. Two modes:
- With
body(recommended): you add the content within the sub-flow and, when finished, the document is saved and closed automatically. - Without
body: returns the session as output; You add content by passing itsession, and at the end you save with Word Save and close with Word Close.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
path | expression | Path where the new .docx will be saved. |
Optional parameters
Section titled “Optional parameters”Ninguno.
Subflows (lanes)
Section titled “Subflows (lanes)”body optional
Section titled “body optional”Activities to build the document. When finished, it saves and closes itself.
Output
Section titled “Output”Returns a ZoanWordSession. Pass it as session to construction activities.
Example
Section titled “Example”Generate a report with title, text and a table:
Word Create path = = "C:/reportes/ventas_" + today().ToString("yyyyMM") + ".docx" └─ body: Word Append Paragraph text = "Reporte de Ventas" style = Title Word Append Paragraph text = = "Generado el " + today().ToString("yyyy-MM-dd") Word Append Paragraph text = "Detalle" style = Heading1 Word Append Table table = = ventasRelated activities
Section titled “Related activities”- Word Append Paragraph / Word Append Table / Word Insert Image — add content.
- Word Open — open an existing document.