Word Automation and append text in the next line

I have a word template having following data.
Name ENO Address Amount
User1 1234 Mumbai 100
User2 1235 Mumbai 100
User3 1236 Mumbai 200

I need to append data to the next line in this word template.
e.g. User4 1237 Mumbai 400 need to be appended.
The word file should look like this.

Name ENO Address Amount
User1 1234 Mumbai 100
User2 1235 Mumbai 100
User3 1236 Mumbai 200
User4 1237 Mumbai 400

Use Word Application Scope Activity for read the word fileā€¦
And then use Append Text Activity, It is used to Add the String at the last in the word Fileā€¦

Donā€™t forgot to Append your new line in ā€œName ENO Address Amountā€ format

Use this Xaml Fileā€¦
word.xaml (6.5 KB)

@Poovarasan2 I need to append at the middle i.e. where this table exists that does not mean at the last in the word file

There are two option to write into word file.
1)Write text- It will over right the previous text appear
2)Append Text- It will add the new text at the last line

And Anotherā€¦
Replace Text Activity- It will only replace the particular text at any position in the word fileā€¦

Please find the template file.


Need to append text to the next line of the table. i.e. next to Sara B. Participant.
There are texts below the table also.

One doubt,
You know the Previous Data/Last Data in the tableā€¦???

if Suppose you know your last entered dataā€¦
Use this,

Capture
For example, Welcome is the previous entered data, and then i want to add Hi as the new data use the above codeā€¦
Before Robot runā€¦
Capture1
After Robot runā€¦
Capture2
It will add at the Last data in the tableā€¦

Need to perform Recording and bot should do at the run time

You must store your Last entered data in some other variable for future use and then checkā€¦

1 Like