I wanna do a simple script that clears the MS Office Clipboard using some VBA code adapted to VBS code.
I Tried this:
Dim XLapp Set XLapp = CreateObject("Excel.Application")
XLapp.CutCopyMode=False
didnt work!
If you are going to writing VBScript then you should download VbsEdit. It is free to use but well worth the price if you are going to be writing a lot of scripts. It also comes with HTAEdit.
Using the sample script you can clear the ClipBoard like this:
Dim toolkit
Set toolkit = CreateObject("vbsedit.toolkit")
toolkit.PutClipboardText ""
Or simple
CreateObject("vbsedit.toolkit").PutClipboardText ""
Note: you can not create a DataObject in VBScript. CreateObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
will work in VBA but will fail in VBScript.
CreateObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
does not work in VBScript. – TinMan