R
Rainer
Hello,
I'm having a problem trying to pass parameters by reference with
WIN32OLE::ARGV. What I'm actually trying to do is getting access to
OneNote 2007 as described here...
http://msdn2.microsoft.com/de-de/library/ms788684(en-us).aspx
....but using Ruby instead.
Here's my little program:
-----
require "win32ole"
one = WIN32OLE.new("onenote.application")
class ON_CONST
end
WIN32OLE.const_load(one, ON_CONST)
a_string = ''
one.GetHierarchy(nil,ON_CONST::HsPages,a_string)
-----
GetHierarchy should pass the Hierarchy of OneNote pages into
"a_string" (I think). However, WIN32OLE::ARGV leaves "a_string" empty:
p WIN32OLE::ARGV
prompt> [-2147352572, 4, ""]
Using invoke won't make a difference:
one.invoke("GetHierarchy", nil,ON_CONST::HsPages,a_string)
p WIN32OLE::ARGV
prompt> [-2147352572, 4, ""]
Does anybody have an idea what I'm getting wrong? (I'm using Ruby
1.8.6)
Kind regards,
Rainer
P.S.: Any example for a successful pass by reference is appreciated,
even with another Office program like Excel or Word.
P.P.S.: I already have read the earlier discussion from Nov. 14 about
the same problem.
I'm having a problem trying to pass parameters by reference with
WIN32OLE::ARGV. What I'm actually trying to do is getting access to
OneNote 2007 as described here...
http://msdn2.microsoft.com/de-de/library/ms788684(en-us).aspx
....but using Ruby instead.
Here's my little program:
-----
require "win32ole"
one = WIN32OLE.new("onenote.application")
class ON_CONST
end
WIN32OLE.const_load(one, ON_CONST)
a_string = ''
one.GetHierarchy(nil,ON_CONST::HsPages,a_string)
-----
GetHierarchy should pass the Hierarchy of OneNote pages into
"a_string" (I think). However, WIN32OLE::ARGV leaves "a_string" empty:
p WIN32OLE::ARGV
prompt> [-2147352572, 4, ""]
Using invoke won't make a difference:
one.invoke("GetHierarchy", nil,ON_CONST::HsPages,a_string)
p WIN32OLE::ARGV
prompt> [-2147352572, 4, ""]
Does anybody have an idea what I'm getting wrong? (I'm using Ruby
1.8.6)
Kind regards,
Rainer
P.S.: Any example for a successful pass by reference is appreciated,
even with another Office program like Excel or Word.
P.P.S.: I already have read the earlier discussion from Nov. 14 about
the same problem.