Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Manipulating clipboard?


Hello,

I'm trying to get the clipboardData.setData and clipboardData.getData
commands to work in some Excel (2000) code, and I can't; I've tried
googling and the help files, but no luck. I'm just looking to examine
the clipboard then reset it.

To try to get something working I've done this:

test_variable = document.parentwindow.clipboardData.GetData("Text" )
MsgBox (test_variable)

and variations on a theme such as

test_variable = clipboardData.GetData("Text")

test_variable = me.clipboardData.GetData("Text")

but I can't seem to get anything working. Up until now, I've been using
a hack I found at
http://www.microsoft.com/technet/scr...4/hey0813.mspx
which uses the following code:

Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate ("about:blank")
clipdata = objIE.document.parentwindow.clipboardData.GetData( "text") '
grab clipboard data
objIE.document.parentwindow.clipboardData.setData "text", "
" ' reset clipboard
objIE.Quit

This appears to work, though I have recently discovered problems with
the code that uses it (which is a dodgy hack in itself using WSH to
cotrol an in-house application) which implies that the clipboard is not
being cleared.

Unfortunately, where I work I don't have the facilities to run this in
a test environment, so my testing is very limited. If I can eliminate
problems with the IE hack then that will help me narrow things down.

Many thanks,


-zoara-

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Manipulating clipboard?

If all you need to do is copy/paste text data, see
www.cpearson.com/excel/clipboar.htm


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
oups.com...

Hello,

I'm trying to get the clipboardData.setData and
clipboardData.getData
commands to work in some Excel (2000) code, and I can't; I've
tried
googling and the help files, but no luck. I'm just looking to
examine
the clipboard then reset it.

To try to get something working I've done this:

test_variable =
document.parentwindow.clipboardData.GetData("Text" )
MsgBox (test_variable)

and variations on a theme such as

test_variable = clipboardData.GetData("Text")

test_variable = me.clipboardData.GetData("Text")

but I can't seem to get anything working. Up until now, I've
been using
a hack I found at
http://www.microsoft.com/technet/scr...4/hey0813.mspx
which uses the following code:

Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate ("about:blank")
clipdata =
objIE.document.parentwindow.clipboardData.GetData( "text") '
grab clipboard data
objIE.document.parentwindow.clipboardData.setData
"text", "
" ' reset clipboard
objIE.Quit

This appears to work, though I have recently discovered
problems with
the code that uses it (which is a dodgy hack in itself using
WSH to
cotrol an in-house application) which implies that the
clipboard is not
being cleared.

Unfortunately, where I work I don't have the facilities to run
this in
a test environment, so my testing is very limited. If I can
eliminate
problems with the IE hack then that will help me narrow things
down.

Many thanks,


-zoara-



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
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? Subu Setting up and Configuration of Excel 1 May 18th 09 06:56 AM
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? Subu Setting up and Configuration of Excel 0 May 5th 09 01:20 PM
Clipboard empty but still get waring that clipboard is full Steve Excel Discussion (Misc queries) 0 June 17th 08 09:05 PM
Manipulating certain rows only Shaz Excel Worksheet Functions 5 February 18th 08 06:31 AM
Manipulating DOS from VBA Dave Peterson[_3_] Excel Programming 0 October 17th 03 01:46 AM


All times are GMT +1. The time now is 04:24 AM.

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

About Us

"It's about Microsoft Excel"