Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? | Setting up and Configuration of Excel | |||
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? | Setting up and Configuration of Excel | |||
Clipboard empty but still get waring that clipboard is full | Excel Discussion (Misc queries) | |||
Manipulating certain rows only | Excel Worksheet Functions | |||
Manipulating DOS from VBA | Excel Programming |