Skip to content

Save and Close Activity

The Save and Close activity manages the state of a Microsoft Word document after operations have been performed. It enables users to save, close, or perform both actions on an opened Word file.

Field Description Requirement
Word name Specifies the reference name of the Word document previously opened or created within the automation workflow. Required
Action Selects the desired operation to perform on the Word document. Options include Save, Close, or Save and Close. Required
Word file name Provides the full path and name if the document is to be saved with a new name or in a different location (Save As operation). Optional

Action Types & Examples

Save

  • Format: String
  • Example Result: SAVE

Close

  • Format: String
  • Example Result: CLOSE

Save and Close

  • Format: String
  • Example Result: SAVE_AND_CLOSE

Implementation Examples

Field Setup - Word name: myReportDocument - Action: SAVE - Word file name: "" (empty string, as not saving as a new file)

Execution Parameters - Word name: activeDocumentReference - Action: SAVE_AND_CLOSE - Word file name: C:\Archive\FinalReport_${DateTime.Now.ToString("yyyyMMdd")}.docx

Technical Notes

When performing a 'Save As' operation, the Word file name parameter must be populated with the desired new path and file name. The Action parameter provides a combined SAVE_AND_CLOSE option to execute both operations sequentially within a single activity instance, eliminating the need to use the activity twice for saving and closing.