Skip to content

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.

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 it session, and at the end you save with Word Save and close with Word Close.
ParameterEditorDescription
pathexpressionPath where the new .docx will be saved.

Ninguno.

Activities to build the document. When finished, it saves and closes itself.

Returns a ZoanWordSession. Pass it as session to construction activities.

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 = = ventas