Overview
Overview
You can work on Word documents using the features provided by the Word library. Using the features, you can create new documents or open existing documents to edit and save
The features provided by the Word library are as follows:
Creating New MS Word documents: NewWord, CreateWord
Opening, Saving, Closing, and Getting Word documents: OpenWord, SaveWord, CloseWord, GetWord
Inserting and Replacing String: ReplaceString, InsertString
Macro Execution: ExecuteMacro
Common Properties
Common Properties
MORE OPTIONS
Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|
On Error | Combination box | N | - | N | Specify an action to carry out when an error occurs at the time of execution. - If not specified: Output errors and exit the task. - --Ignore--: Ignore the error. - --Retry--: Try the activity one more time. - --Goto--: Try the scenario for the specified time if the activity fails. - _Event: Select an event created within the project. |
DESCRIPTION
Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|
DESCRIPTION | Text | N | - | N | Enter the description for the activity card. The description entered in the DESCRIPTION field is used as the description of the activity. A representative value will be displayed in the absence of the DESCRIPTION input. |
NewWord
NewWord
Overview
This activity card creates a new Word document without its file name.
Application procedure
In the [Output] Word field, specify the variable to assign the open Word document.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Output] Result | Variable | Y | - | Y | Specify the variable to assign the open Word document. |
N | Invisible | Toggle button | N | - | Y | Set whether to deactivate the opened Word document. (Default: Off) |
N | Maximize | Toggle button | N | - | Y | Set whether to maximize the window for the opened Word document. (Default: On) |
Y | - | - | - | - | Common property of Word library. | |
Y | - | - | - | - | Common property of Word library. |
Example of utilization
Create a new Word document, Open the word document, and then close the Word document.
Sample file
Menu > Help > Samples > Sample > Word > P_NewWord_Test
Used variables
this.newWord = Variable to assign the opened Word document
Used properties
[Output] Word =
this.newword
Invisible = Off
Maximize = On
Related/Similar activities
CreateWord, OpenWord, SaveWord, CloseWord
OpenWord
OpenWord
Overview
This activity card opens the Word document in the specified path.
Application procedures
In the Path field, enter the path and file name of the Word document to be opened.
In the [Output] Word field, specify the variable to assign the opened Word document
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Output] Word | Variable | Y | - | Y | Specify the variable to assign the opened Word document. (Default: RESULT) |
N | Path | String | Y | - | N | Enter the path and file name of the word file to be opened (ex. 'C:\\ak\\Test.docx') |
N | Invisible | Toggle button | N | - | Y | Set whether to deactivate the opened Word document. (Default: Off) |
N | Maximize | Toggle button | N | - | Y | Set whether to maximize the window for the opened Word document. (Default: On) |
N | Execute Shell | Toggle button | N | - | Y | Set whether to open the Word document in the same way as double-clicking the Word file. (Default: Off) |
N | ReadOnly | Toggle button | N | - | Y | Select whether to open the Word file as read-only. (Default: Off) |
N | Password | Toggle button | N | - | Y | Select whether to use a password. (Default: Off) |
Y | - | - | - | - | Common property of the Word library. | |
Y | - | - | - | - | Common property of the Word library. |
Example of utilization
Open, and then close the previously created Word document.
Sample file
Menu > Help > Samples > Sample > Word > P_OpenWord_Test
Used variables
this.openword = Variable to specify the opened Word document
Used properties
[Output] Word =
this.openword
Path = 'C:\\Create_Word.docx'
Remarks
Various properties, such as “Invisible,” “Maximize,” “Execute Shell,” “ReadOnly,” and “User Password” can be applied when opening an Word file. For more information, see the “Card properties” section of the OpenWord activity card.
Related/Similar activities
NewWord,CreateWord,SaveWord,CloseWord
CreateWord
CreateWord
Overview
This activity card creates a new Word document at a given path.
Application procedures
In the Path field, enter the path and file name of the Word document to be created.
Set the OverWrite property to select whether to overwrite any existing file with the same name.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | Path | String | Y | - | N | Enter the path and file name of the Word document to be created. (ex. 'C:\\ak\\Test.docx') |
N | OverWrite | Toggle button | N | - | Y | Set whether to overwrite the document if a Word document with the same name exists. (Default: Off) |
Y | - | - | - | - | Common property of the Word library. | |
Y | - | - | - | - | Common property of the Word library. |
Example of utilization
Create a new Word document with the specified name in the specified path.
Sample file
Menu > Help > Samples > Sample > Word > P_CreateWord_Test
Used variables
None
Used properties
Path = 'C:\\Create_Word.docx'
OverWrite = off
Related/Similar activities
OpenWord, CloseWord, NewWord, SaveWord
CloseWord
CloseWord
Overview
This activity card closes an open Word document.
Application procedures
Make sure that the Word document you want to close is open.
In the [Input] Word field, enter the variable of the Word document to be closed.
Select whether to forcibly close the document regardless of the document status with the Force property.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Input] Word | Variable | Y | - | N | Enter the variable of the Word document to be closed. |
N | Force | Toggle button | N | - | N | Select whether to forcibly close the Word document regardless of the document status. (Default: Off) |
Y | - | - | - | - | Common property of the Word library. | |
Y | - | - | - | - | Common property of the Word library. |
Example of utilization
Open the previously created Word and then execute the macro. Then, save and close the Word document.
Sample file
Menu > Help > Samples > Sample > Word > P_CloseWord_Test
Used variables
this.openword1 = Variable of the word document
Used properties
[Input] Word =
this.openword1
Force = Off
Related/Similar activities
NewWord, CreateWord, OpenWord, SaveWord
GetWord
GetWord
Overview
This activity card fetches the Word document with a specified file name from among the open Word documents.
Application procedures
In the [Output] Word field, specify the variable to store the execution result.
In the FileName field, enter the file name of the target Word document to fetch.
Set the Maximize property to select whether to maximize the target document window.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Output] Word | Variable | Y | - | Y | Enter the variable to assign the Word document that will be returned as the result |
N | File Name | String | Y | - | N | Specify the target Word file. |
N | Maximize | Toggle button | N | - | Y | Set whether to maximize the window for the target Word document. (Default: On) |
Y | - | - | - | - | Common property of the Word library. | |
Y | - | - | - | - | Common property of the Word library. |
Example of utilization
Get the previously open word document and execute the macro. Then, save and close the Word document.
Sample file
Menu > Help > Samples > Sample > Word > P_GetWord_Test
Used variables
RESULT = Variable to assign the retrieved Word document
Used properties
[Output] Word = RESULT
File Name = 'CreateWord.docx'
Maximize = On
Related/Similar activities
InsertString
InsertString
Overview
This activity card inserts text at a specified Position in a Word document.
Application procedures
In the [Input] Word field, enter the variable for the Word document in which text is to be inserted.
Enter the string to be inserted in InsertString .
Select Target Element, Target Position to determine the relative position where the string will be inserted.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Input] Word | Variable | Y | - | N | Enter the variable for the Word document in which text is to be inserted. |
N | Target Element | Combination box | Y | - | N | Select the location relative to which the text is to be inserted. |
N | StringToSearch | String | If Target Element is Text, Y else, N | - | N | Enter the string to search for within single quotation marks. (***If Target Element is Text, this property is displayed) |
N | StringToInsert | String | Y | - | N | Enter the string to be inserted within single quotation marks. |
N | PartMatch | Toggle button | N | - | Y | Select whether to allow partial search. (Default: Used - blue) |
N | CaseMatch | Toggle button | N | - | wY | Set whether to be case-sensitive. (Default: Not used - gray) |
N | Match Option | Select box | If Target Element is Text, Y else, N | - | N | Select which occurrence to replace: All - The text is inserted at each occurrence of the element.First - The text is inserted at the first occurrence of the element. Last - The text is inserted at the last occurrence of the element. Specific - The text is inserted at the occurrence of the element specified in the OccurrenceIndex property. (*** If Target Element is Text, this property is displayed) |
N | Match Index | Int | If Target Element is Text and Match Option is Specific, Y else, N | - | N | Specific Index of the result value that matches the InputString. (***If Target Element is Text and MatchOption is specific, this property is displayed) |
N | Target Position | Combination box | Y | - | N | Select the position relative to the target element where the text is pasted: (***If Target Element is Document, two options are displayed Start/End) (***If Target Element is Text, two options are displayed Before/After) |
N | New Line | Toggle button | N | - | Y | Sets whether a new line is added before a string is inserted. (Default: Off) |
Y | - | - | - | - | Common property of Word library. | |
Y | - | - | - | - | Common property of Word library. |
Example of utilization
Open the word document and insert the string. Then, save and close the Word document.
Sample file
Menu > Help > Samples > Sample > Word > P_InsertString_Test
Used variables
this.openword = Variable to specify the opened Word document
Used properties
Word = this.openword
Target Element = Document
StringToInsert = 'Hello. This is for \'Insert Text\': \n'
Target Position = Start
New Line = Off
Related/Similar activities
ReplaceString
ReplaceString
Overview
This activity card replaces all occurrences of a string within a document with another string.
Application procedures
In the [Input] Word field, enter the variable of the Word document in which to search for and replace the text string.
In the StringToSearch field, enter the text string to search for.
In the StringToReplace field, enter the string to replace the searched string within single quotation marks.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Input] Word | Variable | Y | - | N | Enter the variable of the Word document that includes the text to replace. |
N | StringToSearch | String | N | - | N | Enter the string to search for within single quotation marks. |
N | StringToReplace | String | Y | - | N | Enter the string to replace the searched string within single quotation marks. |
N | PartMatch | Toggle button | N | - | Y | Select whether to allow partial search. (Default: Used - blue) |
N | CaseMatch | Toggle button | N | - | Y | Set whether to be case-sensitive. (Default: Not used - gray) |
N | Match Option | Select box | Y | - | N | Select which occurrence to replace: All - the text is inserted at each occurrence of the element. First - the text is inserted at the first occurrence of the element. Last - the text is inserted at the last occurrence of the element. Specific - the text is inserted at the occurrence of the element specified in the OccurrenceIndex property. |
N | Match Index | Int | If Match Option is Specific, Y else, N | - | N | Specific index of the result value that matches the InputString. (*** Match Option is Specific, this property is displayed) |
Y | - | - | - | - | Common property of the Word library. | |
Y | - | - | - | - | Common property of the Word library. |
Example of utilization
Open the word document and replace the string. Then, save and close the Word document.
Sample file
Menu > Help > Samples > Sample > Word > P_ReplaceString_Test
Used variables
this.openword = Variable to specify the opened Word document
Used properties
Word = this.openword
StringToSearch = Search
StringToReplace = 'appended'
PartMatch = Off
CaseMatch = Off
Match Option = All
Related/Similar activities
ExecuteMacro
ExecuteMacro
Overview
This activity card runs a specified macro in a macro-enabled Word.
Application procedures
In the Word field, enter the variable of the Word document on which Macro is to be executed.
In the MacroName field, enter the name of the macro to run.
In the Parameters field, enter the necessary parameters required by the macro to run.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Input] Word | Variable | Y | - | Y | Enter the variable of the Word document on which Macro is to be executed. |
N | MacroName | String | Y | - | N | Enter the name of the macro to run. |
N | Parameters | String | N | - | N | Enter the parameters required by the macro to run. If you do not have parameters to enter, do not enter it. -Enter each parameter in ". And multiple parameters are separated by ,. -If you enter characters and numbers in ", it will be processed. |
Y | - | - | - | - | Common property of Word library. | |
Y | - | - | - | - | Common property of Word library. |
Example of utilization
Open the word document and execute the macro. Then, save and close the Word document.
Sample file
Menu > Help > Samples > Sample > Word > P_ExecuteMacro_Test
Used variables
Openword = Variable to specify the opened Word document
Used properties
Word = this.openword
MacroName = 'Highlight'
Related/Similar activities
SaveWord
SaveWord
Overview
This activity card saves the specified Word document.
Application procedures
Make sure the Word document you want to save is open.
In the [Input] Word field, enter the variable of the Word document to be saved.
To save the document in a different file name, enter the path and file name of the document in the SaveAs field.
Card properties
Common | Properties | Type | Required | Unit | Auto-setting | Description |
---|---|---|---|---|---|---|
N | [Input] Word | Variable | Y | - | Y | Enter the variable of the Word document to be saved. |
N | SaveAs | String | N | - | N | To save the document with a different name, enter the path and file name. (ex. 'C:\\ak\\Test.docx') |
Y | - | - | - | - | Common property of the Word library. | |
Y | - | - | - | - | Common property of the Word library. |
Example of utilization
Open the previously created Word file and then execute a macro. Then, save the Word file using a different name and close the word.
Sample file
Menu > Help > Samples > Sample > Word > P_SaveWord_Test
Used variables
this.openword = Enter the variable of the opened Word document
Used properties
[Input] Word =
this.openword
SaveAs ='C:\\CreateWord_SaveAs.docx'
Related/Similar activities