helpstring

WIN32OLE_METHOD#helpstring Instance Public methods Returns help string of OLE method. If the help string is not found, then the method returns nil. tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser') method = WIN32OLE_METHOD.new(tobj, 'Navigate') puts method.helpstring # => Navigates to a URL or file.

helpfile

WIN32OLE_METHOD#helpfile Instance Public methods Returns help file. If help file is not found, then the method returns nil. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE_METHOD.new(tobj, 'Add') puts method.helpfile # => C:\...\VBAXL9.CHM

helpcontext

WIN32OLE_METHOD#helpcontext Instance Public methods Returns help context. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE_METHOD.new(tobj, 'Add') puts method.helpcontext # => 65717

event_interface

WIN32OLE_METHOD#event_interface Instance Public methods Returns event interface name if the method is event. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SheetActivate') puts method.event_interface # => WorkbookEvents

event?

WIN32OLE_METHOD#event? Instance Public methods Returns true if the method is event. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SheetActivate') puts method.event? # => true

dispid

WIN32OLE_METHOD#dispid Instance Public methods Returns dispatch ID. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks') method = WIN32OLE_METHOD.new(tobj, 'Add') puts method.dispid # => 181

new

WIN32OLE_METHOD.new(ole_type, method) â WIN32OLE_METHOD object Class Public methods Returns a new WIN32OLE_METHOD object which represents the information about OLE method. The first argument ole_type specifies WIN32OLE_TYPE object. The second argument method specifies OLE method name defined OLE class which represents WIN32OLE_TYPE object. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs')

unadvise

WIN32OLE_EVENT#unadvise â nil Instance Public methods disconnects OLE server. If this method called, then the WIN32OLE_EVENT object does not receive the OLE server event any more. This method is trial implementation. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie) ev.on_event() {...} ... ev.unadvise

on_event_with_outargs

WIN32OLE_EVENT#on_event_with_outargs([event]){...} Instance Public methods Defines the callback of event. If you want modify argument in callback, you could use this method instead of #on_event. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie) ev.on_event_with_outargs('BeforeNavigate2') {|*args| args.last[6] = true }

on_event

WIN32OLE_EVENT#on_event([event]){...} Instance Public methods Defines the callback event. If argument is omitted, this method defines the callback of all events. If you want to modify reference argument in callback, return hash in callback. If you want to return value to OLE server as result of callback use `return' or :return. ie = WIN32OLE.new('InternetExplorer.Application') ev = WIN32OLE_EVENT.new(ie) ev.on_event("NavigateComplete") {|url| puts url} ev.on_event() {|ev, *args| p