# Setting value of a indexed property of an OLE object

**URL:** <https://www.ruby-forum.com/t/setting-value-of-a-indexed-property-of-an-ole-object/161869>\
**Category:** Rails\
**Created:** [March 3, 2009, 9:07am UTC](https://www.ruby-forum.com/t/setting-value-of-a-indexed-property-of-an-ole-object/161869 "2009-03-03T09:07:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9e8a1a/32.png) [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Post date:** [March 3, 2009, 9:07am UTC](https://www.ruby-forum.com/t/setting-value-of-a-indexed-property-of-an-ole-object/161869/1 "2009-03-03T09:07:50Z")

</div>

I suspect this question is not directly related by Rails but perhaps  
Ruby  
users on this list know an answer for this

I have an OLE object which has an indexed property on it (something like  
a  
dictionary).  
In C# (or similar languages) I set the value of one of the elements in  
the  
indexed property such as this

MyOLEObject myObject = new MyOLEObject();  
myObject[“property name”] = “property value”;

While using ruby Win32Ole api, if I use square brackets as I use in C#,  
I  
get the error " Unkown property or method ‘property name’ ".  
I suspect this is because ruby Win32Ole api tries to set a real propery  
on  
the object such as

myObject.property name = “property value” which is not possible.

Can you give me any directions about how to solve this problem, aka  
setting  
an indexed property through Win32OleApi
