Output file - (sample Attached for reference – paste in highlighted Yellow area)
A word template having a table with 2 columns
The input text should be pasted in the 2nd column (the one that is highlighted)
The text should word wrap and should NOT overflow the column width
The bullets color should be RED
Adding to above, The text that is to be copied from Input file has hyperlinks embedded in it. So while pasting in Output file also, the text should come with hyperlinks embedded in it.
My findings: I had tried writing C# script using Invoke code. Through script I try to read Page 2 data of Input file but when I try pasting in output file through my script it throws error that selection cannot be pasted in table.
Actually it works on the plain document files (like the one you have created).
But If I use the templates (input and output file that are attached to the post), it does not work. The input file’s data is not constant everytime but the format is (like the data to be copied is always on page 2). Because of this scenario I could not get any foreground activity that could be reliable for the requirement.
I tried writing c# script and invoked it through “Invoke code” activity. My script using Microsoft.office.interop.word to copy the page 2 range from input file.
Now using Uipath’s get clipboard text activity, I get the clipboard’s text in a string variable. Then I use “Set bookmark content” activitiy provided by uipath’s package " Uipath.word.activities" to paste the text in output file from the string variable (I added a bookmark to my output file manually )
Through this I am able to get the text in output file but the hyperlinks go away
ok, How did you manage to reach to Page 2 of input file through uipath activity so that we can do a click activity (the first step).
I know we can send Control G hotkey and then type “2” for this. But will that thing be reliable?
If I pick selector of the popup that comes after pressing control G, I am not sure if that will work on user’s machine as well once I deploy my Bot on user’s machine.
Also, After pasting this text to output file, How do I get proper formatting of this pasted text? Is it possible to achieve this through Invoke code or any uipath activity?
The desired formatting is like this (please see image )