I am trying to validate each input in Microsoft Word to see if the values match certain conditions as a form of processing, before saving the word doc.
For example, in the word document, customers can fill in their information (everyoen fills the same word template) and I am trying to use UIPAth to read each field (associated with the type e.g Name, Address) and perform validation
How do I go about doing this?
Welcome to uipath forum
We can use word package to read a word document first
Go to design tab → manage packages → all packages → search as UiPath.Word.Activity and install that package
Now In studio include a WORD APPLICATION SCOPE and pass the file path word doc as input
Inside the scope use READ Text Activity and get the output as string variable named strinput
With that variable we can use some string manipulation and validate the data
Hope this would help you resolve this
how do you know which value belong to which?
in the image i provided, i can get value for Organisation Name
The value I get from screenshot is test.
How do I know this “test” belong to Organisation Name field?
If your document has a fixed template and it doesn’t change at all, you can use screen scraping and extract it into the datable, and row by row you can process/validate.
In case your document frequently changes and there is no fixed template, you can use python script for extracting the tabular information and using string manipulation bring it to the UiPath data table and proceed further with validation.