Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Run macro Version 1 (Net)

Action group: Word 

...

Description

The action runs the specified macro in the Word-document.

...

Action icon

Parameters

Input parameters

ParameterDescription
ContextWord-document instance where the macro will be run.
Macro nameName of the macro that will be run.

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextThe instance of the Word document.Robin.WordWord contextYes
Macro nameThe 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:

...

Блок кода
languagevb
titleReplaceИзбаWithДом
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.

 Реализация 

  1. Assemble a robot scheme with the actions:                                                        
  2. Move the "Open document" action to the workspace.


  3. Move the "Run Macro" action to the workspace.
     

  4. Move the "Save as" action to the workspace.


  5. Move the "Close document" action to the workspace. 


  6. Click "Start" in the top panel to start the robot.

Result

The program robot completed successfully.

...