Save as Version 12 (Net)

Action group: Word


Description

The action saves a Word-document

Action icon

Settings of parameters

ParameterDescription
Word-documentWord-document instance.
Path to savePath to the folder where the document will be saved. If the field is empty, the file is saved in the same folder from which the original file was opened. For example, C:Doc/img.
NameThe name of the new document to be created. If this field is left empty, the file is saved with the same name that the document had when it was opened. For example: New_document.
FormatThe format in which the document will be saved. If this field is left blank, the file is saved in the same format that the document had when it was opened. For example: .docx.

Output parameters

Result - the full path to the saved document.

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Word-documentAn instance of the Word document.Robin.WordWord contextYes
Path to saveThe path to the folder where the document will be saved. If the field is left blank, the file is saved in the same folder from which the original file was opened.Robin.FolderPathC:\doc\imgNo
NameThe name of the new document to be created. If this field is left blank, then the file is saved with the same name that the document had when it was opened.Robin.String
No
FormatFormat of document to save. If this field is empty, the file will be saved in the format the document had when it was opened.Robin.String
No
Results
ResultFull path to the saved document.Robin.FilePath

Special conditions of use

None.

Example of use

Task

There is a file test (2).docx. Open the document and add an entry = "Text" to the start of the document. Next, save the document and close it. 

Solution

Use the "Open document" "Enter text", "Save as", "Close document" actions.

Implementation

  1. Assemble a robot scheme with the actions.


  2. Set the "Open document" action parameters.
    In the "Path to file" field specify the path to the file test (2).docx


  3. Set the "Enter text" action parameters.
    In the "Context" field specify the context created in section 1.
    In the "Text" field specify value "Text".
    In the "Add text to" field specify value "Start of the document".


  4. Move the "Save as" action to the workspace and set its parameter.
    In the "Context" field specify the context of the open document.


  5. Move the "Close document" action to the workspace and set its parameter.


  6. Click "Start" in the top panel.

Result

The program robot completed successfully. The desired text was added to the document. The file was saved and closed.

  • Нет меток