[vb6] Put text in the Clipboard
Sauvegarde2
Posted messages
219
Status
Member
-
bast7373 -
bast7373 -
Bonjour,
I am currently working on a program and I would like it to send text to another program.
I am using the following code:
Boite.SelStart = 0
Boite.SelLength = Len(Boite.Text)
SendKeys ("^{x}")
AppActivate ("OpenOffice.org Writer")
SendKeys ("^{v}")
But strangely, SendKeys ("^{x}") only works when it is alone: as soon as I add code afterwards, it stops working. I have tried various tricks but none have worked :x
Could you tell me how to make SendKeys work, or alternatively how we can write to the clipboard (using the clipboard method)?
Please :D
I am currently working on a program and I would like it to send text to another program.
I am using the following code:
Boite.SelStart = 0
Boite.SelLength = Len(Boite.Text)
SendKeys ("^{x}")
AppActivate ("OpenOffice.org Writer")
SendKeys ("^{v}")
But strangely, SendKeys ("^{x}") only works when it is alone: as soon as I add code afterwards, it stops working. I have tried various tricks but none have worked :x
Could you tell me how to make SendKeys work, or alternatively how we can write to the clipboard (using the clipboard method)?
Please :D