Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative to set clipboard data than using IE in VBS

Status
Not open for further replies.

dhtguru

Technical User
Jan 7, 2007
9
My company has locked down the security settings for IE8, so I can no longer enable scripting to use the clipboard. Is there a way to substitute using Word or Excel in place of IE?
Here is what I am using now.

Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
objIE.document.parentwindow.clipboardData.GetData("text")
objIE.Quit
 
You could use a file. Although, a file may not be practical. What are using the clip board for?

Code:
set objFSO = CreateObject("Scripting.FileSystemObject")

'Write
set objClipFile = objFSO.OpenTextFile("clipboard.dat", 2, true, 0)
objClipFile.Write strData
objClipFile.Close

'Read
set objClipFile = objFSO.OpenTextFile("clipboard.dat", 1, true, 0)
strData = objClipFile.ReadAll
objClipFile.Close



"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer
 
I use it in a script that performs data entry. It copies cells in an Excel spreadsheet assigns it a variable name and then pastes the value as it reaches different locations on a page in a different system.
 
I don't follow. Can you clarify?

It copies cells in an Excel spreadsheet ([red]from where[/red]), assigns it a variable name and then pastes the value ([red]in what[/red]) as it reaches different locations on a page ([red]define[/red]) in a different system([red]define[/red]).

-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer
 
Basically, I am tabing and copying about 12 cells in a spreadsheet. I assign each cell a name and later I paste the values into a web based form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top