why sendkey not working in this case ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matlin
    New Member
    • Nov 2008
    • 1

    why sendkey not working in this case ?

    hi
    Can you help me ?

    problem :
    OS : win XP

    i have open a M S word document using OLE control in vb form, now i want to retrieve selected texts from word file to say clipboard, so i have written like:

    Private Sub Command1_Click( )
    'SendKeys "^(C)", True
    'or
    SendKeys "^{INSERT}"
    End Sub

    but none of them are working.
    I don't understand what is wrong in that, is there any other way by which i can retrieve selected text from M S Word file embedded with vb form and move it to clip board. So that later on i can fetch those text from clipboard to my vb application. Can you give me some suggestion or ideas or sample code for that ?
    Thank you.
Working...