How can i use ctrl + a & ctrl + v to copy all text from one file to other file. type into, send hotkey doesn't seems to be working for this

How can i use ctrl + a & ctrl + v to copy all text from one file to other file. type into, send hotkey doesn’t seems to be working for this.

@amitg,

welcome to our community!

Which file type you have? (.txt, or .docx)?

You can simply store the file that has all the text in a variable and write it to another file using the variable as input.

In case method is unclear, please elaborate what kind of files are being used for copying and pasting the data ?

bro its docx, i want to select all text & paste it to new file with other name.

@anjankum
-Read Text file
-Create one Variable for that text output
-Use Assign Activity assign that output to one variable

  • Create one more variable then again assign it
    -then create text file or doc file whichever do u want

If it is a text file, you can use ‘Read Text File’ Activity to copy all text then use Write Text File to a new file or Append line to add text to a existing file.

@amitg (this should help) If you want to achieve Ctrl + a & Ctrl c (to Copy) then Ctrl + v (to Paste) you can accomplish it by doing the following:
To Select all and copy (Type Into: “[d(ctrl)]ac[u(ctrl)]”)
To Paste (Type Into: “[d(ctrl)]v[u(ctrl)]”)

Or use Send Hotkeys separately.

1 Like

Then get the UiPath.Word.Activities package, then try to use “Read Text” activity and use" Append Text" activity to paste the content into a new document.

Ok let me try this, thanks for the reply. But do we have any provision to get shortcut keys pressed by keyboard like ctrl+s, ctrl+f, ctrl + c & v etc.

Use Send Hot Key activity

Hi,
You can use word activity > read text. assign to a variable and write it to a text file

You can use Send HotKeys,

Inside a attach window activity you can use Send HotKey activity for better results.

So you need to have two Attach Window activities with 2 send hotkeys in the first attach window and 1 in the second attach window.

Doc1 - Opened in Word - Attach window - Send HotKey - Ctrl+A, Send HotKey - Ctrl+C
Doc2 - Opened in Word - Attach window - Send Hotkey - Ctrl+V

Have some delay between the before and after of the send hotkeys if the document large in size