Save as Version 12 (Net)
Action group: Word
Description
The action saves a Word-document.
Action icon
Action parameters
Input parameters
Parameter | Description |
---|---|
Word-document | Word-document instance. |
Path to save | Path 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. |
Name | The 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. |
Format | The 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
Свойство | Описание | Тип | Пример заполнения | Обязательность заполнения поля |
Параметры | ||||
Word-документ | Экземпляр Word-документа. | Robin.Word | Контекст Word | Да |
Путь сохранения | Путь к папке, в которую будет сохранен документ. Если поле остается пустым, то файл сохраняется в той же папке, из которой был открыт исходный файл. | Robin.FolderPath | C:\doc\img | Нет |
Имя | Наименование нового документа, который будет создан. Если данное поле остается пустым, то файл сохраняется с тем же именем, который документ имел при открытии. | Robin.String | Нет | |
Формат | Формат, в котором будет сохранен документ. Если данное поле остается пустым, то файл сохраняется в том же формате, который документ имел при открытии. | Robin.String | Нет | |
Результаты | ||||
Результат | Полный путь к сохраненному документу. | 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
- Assemble a robot scheme with the actions.
- Set the "Open document" action parameters.
In the "Path to file" field specify the path to the file test (2).docx
In the "Add text to" field specify value "Start of the document".- Move the "Save as" action to the workspace and set its parameter.
In the "Context" field specify the context of the open document. - Move the "Close document" action to the workspace and set its parameter.
- 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.