Skip to content

Word Close (Session)

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

Closes a Word session and releases the document from memory. It is the counterpart of Word Open / Word Create when you work without body.

Releases the given session. After that, the session can no longer be used. Closing a session that was already closed raises no error. If you don’t set session, it closes the one of the enclosing body (not needed: the body closes it by itself).

None.

ParameterTypeDefaultDescription
sessionZoanWordSession—The session from Word Open or Word Create.

This activity does not return a value.

Word Open path = asset("report.docx") → output: doc
Word Read Tables session = doc → output: tables
Word Set Property session = doc property = Category value = "Reviewed"
Word Save session = doc
Word Close session = doc
MessageCause and fix
'session' must be a valid Word session (use word-open or word-create).No session was passed (or the variable holds no session) and the activity is not inside a Word Open/Create body.