Hey I have been working with ruby and vbscript lately. There is a scenario where I need to call a ruby script from another vbscript an
You need a shell (%comspec% /c) to get a shell's feature like > redirection. So change
obj = newobj.Run("ruby E:\rubyfile.rb > D:\newdoc.txt",1,true)
to
nRet = newobj.Run("%comspec% /c ruby E:\rubyfile.rb > D:\newdoc.txt",1,true)
(Study the docs for .Run to see the reason for nRet instead of obj and spend a thought on the lousy-ness of the name "newobj")