Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
' Suppose you want to copy some words txtfile "xx.txt"(you have opened it with notepad or wordpad and selected some words)
Private Sub Command1_Click()
AppActivate "xx.txt"
SendKeys "^{c}"
Text1.SetFocus
Text1.Text = ""
SendKeys "^{v}"
End Sub