new

WIN32OLE_TYPELIB.new(typelib [, version1, version2]) â WIN32OLE_TYPELIB object Class Public methods Returns a new WIN32OLE_TYPELIB object. The first argument typelib specifies OLE type library name or GUID or OLE library file. The second argument is major version or version of the type library. The third argument is minor version. The second argument and third argument are optional. If the first argument is type library name, then the second and third argument are ignored. tlib1

visible?

WIN32OLE_TYPE#visible #=> true or false Instance Public methods Returns true if the OLE class is public. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') puts tobj.visible # => true

variables

WIN32OLE_TYPE#variables Instance Public methods Returns array of WIN32OLE_VARIABLE objects which represent variables defined in OLE class. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType') vars = tobj.variables vars.each do |v| puts "#{v.name} = #{v.value}" end The result of above sample script is follows: xlChart = -4109 xlDialogSheet = -4116 xlExcel4IntlMacroSheet = 4 xlExcel4MacroSheet = 3 xlWorksheet = -4167

typekind

WIN32OLE_TYPE#typekind #=> number of type. Instance Public methods Returns number which represents type. tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents') puts tobj.typekind # => 4

to_s

to_s() Instance Public methods Alias for: name

src_type

WIN32OLE_TYPE#src_type #=> OLE source class Instance Public methods Returns source class when the OLE class is 'Alias'. tobj = WIN32OLE_TYPE.new('Microsoft Office 9.0 Object Library', 'MsoRGBType') puts tobj.src_type # => I4

source_ole_types

WIN32OLE_TYPE#source_ole_types Instance Public methods Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE object and having IMPLTYPEFLAG_FSOURCE. tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', "InternetExplorer") p tobj.source_ole_types # => [#<WIN32OLE_TYPE:DWebBrowserEvents2>, #<WIN32OLE_TYPE:DWebBrowserEvents>]

progid

WIN32OLE_TYPE#progid #=> ProgID Instance Public methods Returns ProgID if it exists. If not found, then returns nil. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') puts tobj.progid # => Excel.Application.9

ole_typelib

WIN32OLE_TYPE#ole_typelib Instance Public methods Returns the WIN32OLE_TYPELIB object which is including the WIN32OLE_TYPE object. If it is not found, then returns nil. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet') puts tobj.ole_typelib # => 'Microsoft Excel 9.0 Object Library'

ole_type

WIN32OLE_TYPE#ole_type #=> OLE type string. Instance Public methods returns type of OLE class. tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application') puts tobj.ole_type # => Class