Outlook Close
Outlook Close
Section titled “Outlook Close”Type: outlook-close · Package: Outlook Activities v1.0.4
Closes a session opened with Outlook Connect. It is only needed when you used Connect without body (session stored in an output variable).
How it works
Section titled “How it works”Releases the Outlook connection held by the given session. If you omit session, it closes the session inherited from the Outlook Connect body. It does not close the Outlook window and does not touch any email. After this, the session can no longer be used; closing the same session twice has no effect.
Required parameters
Section titled “Required parameters”None.
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanOutlookSession | — | The session returned by Outlook Connect. Inside the Connect body it is inherited automatically. |
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'session' must be a ZoanOutlookSession. | No valid session was passed and none is inherited. Pass the variable returned by Outlook Connect (session = outlook). |
Example
Section titled “Example”Outlook Connect account = "support@company.com" → output: outlookTry / Catch ├─ try: │ Outlook Get Emails session = outlook folder = "Inbox" → output: emails │ Log message = count(emails) + " pending emails" └─ finally: Outlook Close session = outlookRelated activities
Section titled “Related activities”- Outlook Connect — open the session.