C
Cyril
I am looking to copy from clipboard in a vba string and I am having
trouble doing this: I have used several code sample such as :
http://www.cpearson.com/excel/clipboar.htm and
http://www.vba-programmer.com/Snippets/Code_VB/Clipboard_Data_Using_API.html
but they all give the same result, that is the pasted text is cut in
the middle.
I am trying to paste the text:
"Regions List: 0060aam3.wav
Name In Out Duration
-------------------------- ------------- ------------- -------------
VOICE 00:00:00.012 00:00:00.638 00:00:00.626
VOICE 00:00:00.712 00:00:00.884 00:00:00.172
07 00:00:00.150 00:00:00.389 00:00:00.239
VOICE 00:00:00.251 00:00:00.328 00:00:00.077
10 00:00:00.464 00:00:00.537 00:00:00.073
VOICE 00:00:00.746 00:00:00.860 00:00:00.114"
Using the code :
Dim myVar As Variant
Dim MyDataObj As New DataObject
MyDataObj.GetFromClipboard
myVar = MyDataObj.GetText()
But the myVar variable is set to
"Regions List: 0060aam3.wav
Name In Out Duration
-------------------------- ------------- ------------- -------------
VOICE 00:00:00.012 00:00:00.638 00:00:00.626
VOICE " after this instruction.
I haved searched in google but not seen any limitation on string size.
I have tried to empty clipboard or call again getText but this doesn't
work either.
Have anyone ever experienced this ?
Any idea ?
Thanks for your feedback,
Cyril
trouble doing this: I have used several code sample such as :
http://www.cpearson.com/excel/clipboar.htm and
http://www.vba-programmer.com/Snippets/Code_VB/Clipboard_Data_Using_API.html
but they all give the same result, that is the pasted text is cut in
the middle.
I am trying to paste the text:
"Regions List: 0060aam3.wav
Name In Out Duration
-------------------------- ------------- ------------- -------------
VOICE 00:00:00.012 00:00:00.638 00:00:00.626
VOICE 00:00:00.712 00:00:00.884 00:00:00.172
07 00:00:00.150 00:00:00.389 00:00:00.239
VOICE 00:00:00.251 00:00:00.328 00:00:00.077
10 00:00:00.464 00:00:00.537 00:00:00.073
VOICE 00:00:00.746 00:00:00.860 00:00:00.114"
Using the code :
Dim myVar As Variant
Dim MyDataObj As New DataObject
MyDataObj.GetFromClipboard
myVar = MyDataObj.GetText()
But the myVar variable is set to
"Regions List: 0060aam3.wav
Name In Out Duration
-------------------------- ------------- ------------- -------------
VOICE 00:00:00.012 00:00:00.638 00:00:00.626
VOICE " after this instruction.
I haved searched in google but not seen any limitation on string size.
I have tried to empty clipboard or call again getText but this doesn't
work either.
Have anyone ever experienced this ?
Any idea ?
Thanks for your feedback,
Cyril