Masaki Suketa,

Thank you for your prompt reply.  It is still not working with either of
these variations.  How would I send a VT_ERROR with a value of
DISP_E_PARAMNOTFOUND

psuedo code like the following

WIN32OLE::VARIANT.new(DISP_E_PARAMNOTFOUND, WIN32OLE::VARIANT::VT_ERROR)


On Sat, Aug 9, 2014 at 9:59 PM, MasakiSuketa <masaki.suketa / nifty.ne.jp>
wrote:

> Hello
>
> On Sat, Aug 09, 2014 at 10:09:30AM -0600, Dominic Sisneros wrote:
> > I have a function that accepts either a Nothing in VBA or a Template of
> type Element. When I pass in nil in ruby it doesn't work because it is
> expecting a type of element. How can I correctly pass a non value that gets
> accepted.   This iron python guy explains it better
>
> > My basic understanding is that it is trying to convert None into an
> 'Element' object, but is unable to do so. Is there a way around this?
>
> I'm not sure it works or not, but try WIN32OLE_VARIANT object instead of
> nil.
>   nilobj = WIN32OLE_VARIANT.new(nil, WIN32OLE::VARIANT::VT_VARIANT)
> or
>   nilobj = WIN32OLE_VARIANT::Nothing
> and call CreateLineElement2
>   object.CreateLineElement2 (nilobj, startpoint, endpoint)
>
>   Regards,
>   Masaki Suketa
>
>