L
Li Chen
Hi all,
I want to open a file via win32ole. I find the method 'Open' there but
always get error feedback. I wonder if anyone can give me a hand.
Thanks,
Li
########################
require 'win32ole'
fs=WIN32OLE.new('SAPI.SpFileStream')
count=1
fs.ole_methods.each{|m|
print count,"\t"
print m,"\t"
print m.return_type_detail,"\t"
puts
count+=1
}
file='c:/test.txt'
fs.open(file)###line14 here
win32ole2.rb:14:in `method_missing': open (WIN32OLERuntimeError)
OLE error code:800C0005 in <Unknown>
<No Description>
HRESULT error code:0x80020009
Exception occurred. from win32ole2.rb:14
I want to open a file via win32ole. I find the method 'Open' there but
always get error feedback. I wonder if anyone can give me a hand.
Thanks,
Li
########################
require 'win32ole'
fs=WIN32OLE.new('SAPI.SpFileStream')
count=1
fs.ole_methods.each{|m|
print count,"\t"
print m,"\t"
print m.return_type_detail,"\t"
puts
count+=1
}
file='c:/test.txt'
fs.open(file)###line14 here
win32ole2.rb:14:in `method_missing': open (WIN32OLERuntimeError)
OLE error code:800C0005 in <Unknown>
<No Description>
HRESULT error code:0x80020009
Exception occurred. from win32ole2.rb:14