UI Vision Desktop ( Select text, copy, and paste) from word document

Hey Guys,

I am trying to do something very simple on a Word Document using UI Vision desktop Automation

Open Word> Open document in word> Copy all Text>Open Excel> paste into Excel> save and close

I know how to open the word document and I know how to open a specific file in Word. But for the life of me can’t figure out the rest.

I have tried XClick followe by OCRExtractRelative BUT I can’t get this to work.

Please help. If you can provide the steps that would be great!

This is very long to do, you must use desktop automation and keys combination, require large amount of time a similar automation.

To open document word you can use Xrun command or a batch file

After with keyboard combination you can do the rest of works (using xtype)

Study this

https://ui.vision/rpa/docs/xtype

It certainly can be done just as @newuserkantu said. But the best option for Office automation is to use VBA (= Word and Excel macros). It is built in directly into Office and free. It is better than anything else. For example UIPath and Automation Anywhere sell Office connectors for a lot of money - you do not need it.

Btw, you can start VBA macros directly from UI.Vision RPA software with the XRUN command. So the integration with UI.Vision is easy.

For copy and paste:

  • To send data to the clipboard use store | your text | !clipboard

  • To get data from the clipboard use store | !clipboard | variable

  • To highlight and copy text:

    • xclick | image of text box | #tripleclick or xtype | {KEY_CTRL+KEY_A}
    • xtype | {KEY_CTRL+KEY_C} (copy shortcut)
  • To paste text use:

    • store | your text | !clipboard
    • xtype | {KEY_CTRL+KEY_V} (paste shortcut)
2 Likes

Thank you so much, after trying to figure this out for more than a day, I figured that much. haha.

Seems like it should be something simple, but anything that it Desktop Automation seems very time consuming, unlike a Browser Automation.

Thank you again, I’ll study the material, at least now I know that there is a way to do it at least.

I was under the impression that this does not work for Desktop applications, rather Web browsers only?

I’ve been able to do some of these commands, but , these will only work on a web browser, not on Desktop applications like “Word” or “Excel” correct?

Interesting, I will look into this. Thank you!

To use desktop automation you need focus on front of software/page you want use and you can not use mouse because desktop automation move your mouse and works in active part in the screen this is the very disadvantage of desktop automation.

You must have Word or Excel in front and you can not use mouse or other application in front during macro play.

I rarely using desktop automation because I work with multiple browser in same time and for me it’s impossibile to have in front 1 single software/page to use desktop automation.

All the commands I listed for for web browser and desktop apps. If you run into an issue, best to open a new forum post and add some screenshots or a short screencast. Then we can help further.

1 Like

All the commands I listed work for web browser and desktop apps. If you run into an issue, best to open a new forum post and add some screenshots or a short screencast. Then we can help further.

Yeah, unfortunately, I am not using web browsers, only Word and Excel for now ( it is what I need) and desktop automation is the only one that can be used for these correct?

The record option on web browsers makes everything very simple compared to the Desktop automation.

Yes, it’s very slow and hard create macro for desktop automation.

In my tests the problem of desktop automation is have always focus on page/software to automate, sometimes it’s hard to have focus because you can have in front another window.

Another problem of desktop automation is that you can not record macro, but you must create macro 1 command per times (very slow).

I’ll have to try the question again with screenshots like you have advised.

Unfortunately, I am even having trouble understanding the commands you have provided me with, it throws an error on the first xClick command. I am using the “find” option to select an image of text box in my word document.

Thanks for your help so far though. I’m just hoping there is some type of solution that is not extremely time consuming once I get this down.

Have you installed xmodules before using Xclick and Xtype ?

There types of command require xmodules installed.

With free plan you can use max 25 Xclick/Xtype per executioin, remember if you use more of 25 xclick/xtype for execution (macro) you will show an error and you must pay the pro license.

https://ui.vision/rpa/x/download

yes, they are all installed.

I am no longer getting any errors, but the commands I am using are still not giving me exactly what I want.

I’ll keep working on it a little more, and repost the question with screenshots if that doesn’t work, I’ll have to go with another RPA maybe.

Thanks

This work doesn’t make much sense to do it with ui vision. ui vision is used to carry out long and strenuous data entry work.

This job is done for free and quickly online with a tool to convert files from word to excel.

It doesn’t really make sense to take so long to make a macro like this for a job so simple that online you can do it quickly.

I wouldn’t take a week to make a macro to do this job, better to use the time to create macros that allow you to do jobs that you can’t do in other ways.

Thank you for clearing that up, I didn’t want to spend more time on this, so this is helpful to know.

Are there any online tools that you can recommend?

I’ll research some on my own, but if you have any in mind that would be great.

Thanks again for all of your help!

Some work can be done better with external tools, ui vision can not make every work.

To convert file from word to excel there are a large amount of sites

I tried this and working in 2 seconds converted document from word to excel free and fast

https://www.watermark-images.com/convert-word-to-excel.aspx

But there are more and more similar sites all free.

Thanks, I think I should have mentioned that I am just trying to figure out how to open> select text> copy> open another project> paste in the project with any program, not just Word and Excel. I don’t think this will work with a lot of other programs, That’s why I am looking for an RPA that can do this.

Thanks for your help though.

Ui vision RPA is a manual software, you must create step by step the automation and this require a long amount of time, for simple operation it’s not convenient to spend a lot of time especially desktop automation takes a lot of time in fact programmers ask for a lot of money to create a desktop automation because it takes too long.

I study about 3 hours a day for 2 years ui vision RPA and I know how to do the automation that you wanted to do, but I can because I studied so much but try to spend time in useful automations that bring gains otherwise it would not make sense to have studied 3 hours a day for 2 years to realize a trivial conversion of documents from word to excel that has no profit and is made online for free in a few seconds.

I mainly use my time to make grabbers of data online or proxy scrapers or custom automatic fillers where there are many things to do (for now I’m making macros to automatically insert wordpress articles)

To realize your automation you have to spend a lot of time for the focus which is the most difficult thing because you have to always have the correct sheet in front of the screen (word or excel), is it worth taking 3-4 hours a day for at least 1 week to realize this automation ? In my opinion, no, you risk taking a lot of time to do something useless that brings no profit and no gain.

The way to do your work is @Plankton post

I know this command and are best to create your automation but before you must study and know well ui vision command and this require time.