История страницы
Run macro Version 1 (Net)
Action group: Word
...
Description
The action runs the specified macro in the Word-document.
...
Action icon
Parameters
...
Settings of parameters
Parameter | Description |
---|---|
Context | Word-document instance where the macro will be run. |
Macro name | Name of the macro that will be run. |
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | The instance of the Word document. | Robin.Word | Word context | Yes |
Macro name | The name of the macro to be run. | Robin.String | Yes |
Special conditions of use
The macro must be created in Word beforehand.
...
This way you can either create your own macro or paste a ready-made one into this field and save it using CTRL+S.
Example of use
Task
There is a Word-document:
...
Блок кода | ||||
---|---|---|---|---|
| ||||
Sub ReplaceИзбаWithДом() Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "Изба" .Replacement.Text = "Дом" .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll End Sub |
Solution
Use the "Open document", "Run Macro", "Save as" actions.
Реализация
- Assemble a robot scheme with the actions:
- Move the "Open document" action to the workspace.
- Move the "Run Macro" action to the workspace.
- Move the "Save as" action to the workspace.
- Move the "Close document" action to the workspace.
- Click "Start" in the top panel to start the robot.
Result
The program robot completed successfully.
...
Обзор
Инструменты контента