Accessing custom properties on drop

J

Jason V

I have VBA code dropping a master shape from the stencil with the following
ThisDocument.Pages("StencilName").Drop mstStencil, ShapePinX, ShapePinY
The master shape also has some custom properties such as text, width, height.

When I drop the shape I also want to put values in these properties, how can
zI do this?

Thanks
 
P

Paul Herber

I have VBA code dropping a master shape from the stencil with the following
ThisDocument.Pages("StencilName").Drop mstStencil, ShapePinX, ShapePinY
The master shape also has some custom properties such as text, width, height.

When I drop the shape I also want to put values in these properties, how can
zI do this?

The Drop method returns a shape object, you need to store this, then
access this shape's .Cells[<cellname>] properties to set the other
values.
 
J

Jason V

Thanks Paul. What is the syntax for accessing this?
After I do a drop of a shape say ShapeName I tried
ShapeName.Cells [width] = 1, but I get an error.
--
Jason V


Paul Herber said:
I have VBA code dropping a master shape from the stencil with the following
ThisDocument.Pages("StencilName").Drop mstStencil, ShapePinX, ShapePinY
The master shape also has some custom properties such as text, width, height.

When I drop the shape I also want to put values in these properties, how can
zI do this?

The Drop method returns a shape object, you need to store this, then
access this shape's .Cells[<cellname>] properties to set the other
values.
 
A

Al Edlund

you might try something like this
Set visCell = devShape.Cells("width")
visCell.formulau = ""32""

there are a number of cell manipulation examples in the sdk

al

Jason V said:
Thanks Paul. What is the syntax for accessing this?
After I do a drop of a shape say ShapeName I tried
ShapeName.Cells [width] = 1, but I get an error.
--
Jason V


Paul Herber said:
I have VBA code dropping a master shape from the stencil with the
following
ThisDocument.Pages("StencilName").Drop mstStencil, ShapePinX, ShapePinY
The master shape also has some custom properties such as text, width,
height.

When I drop the shape I also want to put values in these properties, how
can
zI do this?

The Drop method returns a shape object, you need to store this, then
access this shape's .Cells[<cellname>] properties to set the other
values.
 

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