Skip to content

Word Save (Session)

Type: word-save  ·  Package: Word Activities v1.0.4

Saves to disk the changes of a Word session. You need it when you change a document opened with Word Open (with or without body), or to save a copy to another path (Save As).

Writes the current in-memory state of the document. If you set path, it saves to that new path; if you omit it, it saves to the original path (the one from Word Open or Word Create).

  • An existing file at the target path is overwritten; missing folders are created.
  • Save As does not change the session’s path: a later Word Save without path saves to the original path again.
  • The session stays open after saving; you can keep editing and save again.
  • If you don’t set session, it uses the one of the enclosing Word Open or Word Create body.

None.

ParameterTypeDefaultDescription
sessionZoanWordSession—The session from Word Open or Word Create. Inherited automatically inside a body.
pathstring—Save to another path (Save As). Omit it to use the original path.

This activity does not return a value.

Word Open path = asset("template.docx") → output: doc
Word Find & Replace session = doc find = "{CUSTOMER}" replace = customer.name
Word Save session = doc path = "C:/letters/" + customer.id + ".docx"
Word Close session = doc
MessageCause and fix
'session' must be a valid Word session (use word-open or word-create).No session was passed and the activity is not inside a Word Open/Create body.
File access errorThe path is not valid, there is no write permission, or the file is open in Word or another program. Close it or save under another name.
Closed session errorThe session was already closed with Word Close or when its body ended. Save before closing.