How do I automatically work out the ID of the Shape Section?

Started by PuzzledSpark, July 24, 2012, 12:33:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PuzzledSpark

I'm trying to ultimately write code that works out the name of the 3rd or 4th custom property in a shape, and then depending on the name, renames it to something else.

I don't know the name of the custom property in advance so have to use CellsSRC to work it out. But this requires knowing the ID number for the "Shape Data" section.

Is that ID always a fixed number? If so what is it? If not how do I determine it programmatically?

Jumpy

You can iterate through all the rows in a given section. Maybe that's a start for you?

PuzzledSpark

Yep that's what I'm planning on doing using the CellsSRC function.
However I need to know the ID number of the Section, I can't just type in CellsSRC("Shape Data", 1, 1)

I want to be 100% sure the ID number (whatever it is, can find it through trial and error if need be), is always correct. So I want to know how I can determine the ID number for the shape section programatically.

Jumpy

OK, now I hope I understand what you're looking for.
MSDN is your friend:

http://msdn.microsoft.com/en-us/library/office/ff765983.aspx


visSectionProp->243->Stores shape data (formerly custom properties).

PuzzledSpark

Ah great thanks.

VisSectionIndices.visSectionProp , that makes life easy.