UiPath Studio offers you the possibility to work with Word using specialized activities. These activities are stored in the UiPath Word activities package. The Word package can be downloaded from "Manage Packages" and it's not by default installed when you install UiPath Studio.
By using these activities you will be able to read/write Word documents. If the document is newer than 2007, with the .docx extension, you can work directly with the file activities located in the Activities pane under System/File/WordDocument. Otherwise, if it has .doc extension, you will need to have Microsoft Office installed and you can find specific activities under App Integration/Word. This is the default behaviour for all Word activities but you can opt to work with the Word Application.
Here are some points that you need to take into account when choosing one of the two approaches:
Good points for not using the Word application:
- You don't need to install/buy Microsoft Word
- Word application will not pop up on your desktop
- Suitable for robots that run on a machine that doesn't have an user interface
Good points for using the Word application:
- You are able to see the document and the changes are visible
- If the document is already opened, the automation will attach to the opened document
Let's look upon a simple example for a better understanding of how each method works.
In this sample we want to open two documents. One document is for reading data, and the other one is for writing data. The second document will be opened with the Word application so we can see the changes in real-time.
We will use the two methods in the same workflow.
We read the first document (1) without using the Word application. For the second document (2) we use Word Application Scope which works with the installed Word application. In this document we use Replace Text (3) and Append Text (4).