I can access the clipboard via the IE object, but this requires interaction.
Since I have AutoIt installed I found that I can write to the clipboard like this:
Here's the weird part. I'm running 64-Bit Win2008. If I put the above into a VBS and click on it, it works fine. If instead I call the script from a 32-bit launcher (SlickRun, which I use for everything) then I get an error message stating the AutoItX3 control can't be created. Same if I run the script using the 32-bit WScript.exe in the SysWOW64 folder.
I'm open to any alternative methods for reading/writing to the clipboard, or some kind of workaround with the AutoIt control.
Thanks.
Since I have AutoIt installed I found that I can write to the clipboard like this:
Code:
Private Sub Write_to_Clipboard(sClipboard_Text)
Dim oAutoIt 'as Object = AutoItX3.Control
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
oAutoIt.ClipPut sClipboard_Text
Set oAutoIt = Nothing
End Sub
Here's the weird part. I'm running 64-Bit Win2008. If I put the above into a VBS and click on it, it works fine. If instead I call the script from a 32-bit launcher (SlickRun, which I use for everything) then I get an error message stating the AutoItX3 control can't be created. Same if I run the script using the 32-bit WScript.exe in the SysWOW64 folder.
I'm open to any alternative methods for reading/writing to the clipboard, or some kind of workaround with the AutoIt control.
Thanks.