Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy from clipboard in excel/vba: size limit ?


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/Snippe...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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Copy from clipboard in excel/vba: size limit ?

Cyril,
You code works for me. Maybe it is the copying stage that is not acting as
expected ?

Also, I would add a check to make sure there is something in the correct
format to copy first:

Const TEXTFORMAT As Long = 1

MyDataObj.GetFromClipboard

If MyDataObj.GetFormat(TEXTFORMAT) Then
myVar = MyDataObj.GetText()
End If

NickHK

"Cyril" wrote in message
oups.com...

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/Snippe...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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel size limit? Oscar Excel Discussion (Misc queries) 1 August 20th 07 06:37 PM
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? tskogstrom Excel Programming 2 March 6th 07 12:50 PM
Cell size? Or size limit for Text data type? CClem Excel Discussion (Misc queries) 0 April 21st 06 04:09 PM
Limit on Excel 97 file size? Jim Brass Excel Programming 1 June 3rd 05 12:58 AM
What is the limit size for columns in Excel??? Melissa Excel Discussion (Misc queries) 5 May 16th 05 09:29 PM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"