class WIN32OLE::Variant

WIN32OLE::Variant objects represents OLE variant.

Win32OLE converts Ruby object into OLE variant automatically when invoking OLE methods. If OLE method requires the argument which is different from the variant by automatic conversion of Win32OLE, you can convert the specified variant type by using WIN32OLE::Variant class.

param = WIN32OLE::Variant.new(10, WIN32OLE::VARIANT::VT_R4)
oleobj.method(param)

WIN32OLE::Variant does not support VT_RECORD variant. Use WIN32OLE::Record class instead of WIN32OLE::Variant if the VT_RECORD variant is needed.