putClipBoardText4 InputBox("Enter some text", "Test Clip Write/Read") wsh.sleep 50 wsh.echo GetClipBoardText4 ' Requires IE v5.0+ Function getClipBoardText5() With CreateObject("htmlfile") On Error Resume Next getClipBoardText5 = .ParentWindow.ClipboardData.GetData("text") end with ' htmlfile End Function ' Requires IE v5.0+ sub putClipBoardText5(sText) With CreateObject("InternetExplorer.Application") .Navigate "about:blank" Do Until .ReadyState = 4 : WScript.Sleep 50 : Loop .document.ParentWindow.ClipboardData.SetData "text", sText end with ' IE End Sub ' Requires IE v4.0+ sub putClipBoardText4(sText) With CreateObject("InternetExplorer.Application") .Navigate "about:blank" Do Until .ReadyState = 4 : WScript.Sleep 50 : Loop With .document .open .write(sText) .close Do Until .ReadyState = "complete" : WScript.Sleep 50 : Loop .execcommand "SelectAll" .execcommand "Copy" end with ' document end with ' IE End Sub ' Requires IE v4.0+ Function getClipBoardText4() With CreateObject("InternetExplorer.Application") .Navigate "about:blank" Do Until .ReadyState = 4 : WScript.Sleep 50 : Loop With .document .open .write("") .close Do Until .ReadyState = "complete" : WScript.Sleep 50 : Loop with .body.createTextRange .execcommand "Paste" end with ' TextRange getClipboardText4 = .body.innerText end with ' body end with ' IE End Function