Bot is getting stuck in "In Progress" Status when appending text to word document

I am trying to append text to a word document using “Append Text” activity inside “Word Application scope”. It runs successfully for 100s of Queue items, but sometimes Bot gets stuck infinitely at Appending text activity. Also it does not throw any error, so every time I have to kill the job.

Any reason for it? Please confirm.

I have experienced similar things with using MSWord activities.
In my case it was exporting .docx to pdf.

What I noticed was that the impacted documents all had settings like ‘tracking changes’ or ‘user comments’. Performing export the steps manually, the save moment triggered a popup, if I wanted to retain the notes in the document. Using the activity, the popup wasn’t visible though.

Since this prompt is part of the save actions of the MSWord API, the Robot is still thinking the activity is ongoing and waiting for it, while MSWord (visible or not) waits for user input. This virtual staring contest leads to infinite waiting times. And since no error is thrown, it’s not directly possible to catch it.

My solution was replacing my MSWord activity with manual steps, including looking for popups and prompts. (Compile it into a new library if you want a single activity again).

Alternatively, if you just want a timeout option on such occurences, you can make a parallel activity, one for MSWord, and one with some form of timeout counter which throws a SE when the end result is not achieved in time.

Hi @Jeroen_van_Loon

Thanks for your reply. Since Text Append Activity (inside Word App scope) was giving issues, I used System - Text Append Activity and it is working fine. Much faster as well. I will keep it under monitor though.

Thanks,
Sumit Tyagi

@loginerror @lakshman @Palaniyappan I saw few of your posts on Word Append Text activities. But my issue is different. Can you please help?

Can you please confirm if this a know error of word activities? Any exact resolution for this? I have tried both - Word Application Scope -Append text and System - Append Text activities. But for few queue items Bot gets stuck In progress infinitely and doesn’t not proceed. More over these activities do not have timeouts.

Hi @sumit.tyagi

Could you maybe share a sample project that reproduces this issue for you? Ideally with simple, dummy data.

Please also provide additional information (versions of your Studio, of your Word activity package, etc)

@loginerror

This issue is not consistent hence I will not be able to reproduce the issue. I have 27000 records in queue. Word append activity worked fine for 21000 records and for 20 records till now Bot got stuck infinitely with no logs/response, as there was no timeout. Hence, I have to restart the job manually every time when the queue items are not getting processed ahead.

UiPath v is 2019.4.2
UiPath.Word.Activities v is 1.5.3

PFA the Word document sample which I am using to append large text into it.

Notice Template_Broker v0.3.docx (14.1 KB)

Thank you for the additional information. If that is an option, please consider contacting our technical support via this form:

One thing to try out would be to update the Word activity package to the latest version. Another, more invasive one would be to also update Studio and Robot, as many improvements were made since the 2019.4 version. For further update consideration, I would definitely suggest contacting our technical support though.