addSection error in VBS

R

rodionos

Hello,

My environment is Visio 2007 12.0.6423.1000 SP2 and I am trying to add a
custom property from a vbs file:

The following code fails with 'bad or missing index':

Set vsoShape = actPage.DrawRectangle(1, 5, 5, 1)
vsoShape.AddSection visSectionProp

If I replace visSectionProp with 243 as specified in VisSectionIndices
Constants in SDK, the code works fine.

Set vsoShape = actPage.DrawRectangle(1, 5, 5, 1)
vsoShape.AddSection 243

Does anyone have a suggestion on how to make Visio constants work in a VBS
script?

Thanks,

Sergei
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top