Dan77
March 25, 2020, 4:25pm
1
Hi friends,
I have a very simple task to do.
Example Copy Formatted Text from Wikipedia to an Open Word Document
Hemicyoninae
Ursavinae
Agriotheriinae
Ailuropodinae (Pandas)
Tremarctinae (Spectacled Bears)
Ursinae (All other bear species)
Bears are carnivoran mammals of the family Ursidae. They are classified as caniforms, or doglike carnivorans. Although only eight species of bears are extant, they are widespread, appearing in a wide variety of habitats throughout the Northern Hemisphere and partially in the Southern Hemisphere. Bears are found on the continents of North America, South America, Euro...
I selected the first paragraph only.
Next I have made the Get Text to a variable myText set to Clipboard
Then I paste this formatted Text into my word document
Miserably failed this simple task.
The Error
Please do advise thank you
Nandhuba
(Nandhini Balasubramani )
March 27, 2020, 2:26am
2
Hai @Dan77 …
Use Hot keys Like Ctrl+C to Copy the Text and Ctrl+V to paste the text . Ensure that the paragraph is within the given limit or change it as u want…
Example Work flow👇
BlankProcess3 - Copy.zip (942.5 KB)
Dan77
March 27, 2020, 4:41pm
3
Hi Nandhuba,
Thanks for your help.
I should explain what I am trying to do better.
Goal
Go to a Web Page - Example Wikipedia Page
Copy the FORMATTED TEXT from a SPECIFIC Selector Class
Paste into Word
I can use get text but it pastes it as plain text.
I really want the original format as it is displayed on the web page.
The problem is because I want the formatted text from a specific element only.
I have tried for the past 2 days but no luck yet.
Dan77
March 27, 2020, 5:00pm
4
Please Find attached my workflow so far
Bear_Forum.xaml (8.1 KB)
As you can see the differece between the 2 types of text
Formatted Text has hyperlinks and other formatting that I may need.
If you go to a web page and do CTRL C and paste into word you get the formatted text.
I only want the formatted text from a specific selector class.
Thank you for your help
Nandhuba
(Nandhini Balasubramani )
March 28, 2020, 2:23am
5
@Dan77 … if the text is an UiElement, use get attribute activity with the attribute as “href”. The output would be the url which you can navigate to… Example Work flow
HtmlCopyTest.xaml (6.9 KB)
Dan77
March 28, 2020, 10:58am
6
HI Nandhuba,
I extracted the inner html. Now the Pasted Text has text and html mixed .
Is there no way to simply get the original Formatted text as displayed.
Whenever you copy something from a webpage and paste into word, you get the original formatted text.
I tried to use an invoke method with clipboard rtf , but that didnt work.
I dont understand how to use the invoke method with formatted clipboard.
thanks
1 Like
Nandhuba
(Nandhini Balasubramani )
March 28, 2020, 1:39pm
7
@Dan77 I was able to use Get Text Activity and use Type Into Activity to Write the Text into the Word Document, It takes a lot of time to type the Information. Is that fine?
Dan77
March 28, 2020, 3:04pm
9
Hi all, thanks for the input on this rather basic situation that has become complex.
@supermanPunch - I would be intrested to see if this works.
If it types the formatted text as displayed on the web page, then thats suffice for now.
I am starting to learn ui path again and just wanted to do some basics.
Dan77
March 28, 2020, 3:13pm
10
Hi @supermanPunch
It only types in the plain text.
The formatting and hyperlinks are all missing.
I have no problem extracting plain text or inner html.
The formatted original text I cant seem to find a way to get.
1 Like
bcorrea
(Bruno Correa)
March 31, 2020, 2:39am
11
This seams the way to go, but if you are taking from html formatted text and pasting into Word, then Word must accept the same…
Dan77
April 1, 2020, 9:50pm
12
Hi all,
Still no easy solution to this problem.
I have found that you can triple click on the text and it will select the paragraph.
In simple test cases I have sent the click activity 3 times.
It has worked to select the text.
When combined in full automation it often fails.
I have tried all combinations of single clicks, double clicks.
This is not an ideal solution at all.
Alternative is to use vbnet
I read that VB.net script can click mouse.
I wanted to click the mouse using vb.net , to send 3 mouse clicks.
if any one can show me how to use vbnet to click the mouse 3 times that would be appreciated.
I have searched for vb mouse click on forum, I couldnt get it to work.
I hope UI path can remedy this situation in future, as its such a fundamnetal basic task that we do every day copy and paste selected text.
bcorrea
(Bruno Correa)
May 4, 2020, 7:57pm
13
Did you try 3 click with all delays set to 0?