invoke(...)
public
Runs OLE method. The first argument specifies the method name of OLE
Automation object. The others specify argument of the method. If
you can not execute method directly, then use this method instead.
excel = WIN32OLE.new('Excel.Application')
excel.invoke('Quit')
Show source
/*
* call-seq:
* WIN32OLE#invoke(method, [arg1,...]) => return value of method.
*
* Runs OLE method.
* The first argument specifies the method name of OLE Automation object.
* The others specify argument of the <i>method</i>.
* If you can not execute <i>method</i> directly, then use this method instead.
*
* excel = WIN32OLE.new('Excel.Application')
* excel.invoke('Quit') # => same as excel.Quit
*
*/
static VALUE
fole_invoke(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
{
return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);
}