How can I set set value for properties of Shapes

Started by bazinga, November 25, 2015, 05:31:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bazinga

Hi Guys,
Visio newbie here.

The user defined cells value is read only and cannot be changed according to this microsoft page - https://msdn.microsoft.com/en-us/library/office/ff765764.aspx

My goal is to mark the shape so that I can identify it later in the code. For example, I copy a shape and move towards right. Then I repeat this for 5 times. Now I have 6 shapes. I'd like to mark all these shapes so that I can access it through some property value and group them. I cannot use the name or other existing properties because the shapes can be used somewhere in the same document.

Any ideas?

Thank you for you help.

Yacine

Hi Bazinga,
If you had read the article of the mentioned link till the end, you would have found that despite CELLS is read only, it has a property FORMULA that has read/write access.
Thus: shp.cells("user.myProperty").formula=chr(34)&"something"&chr(34)

HTH,
Y.
Yacine