Adjustments on msoShapeHexagon

G

Gustaf

Hi all,

I'm making a VBA program to generate a PowerPoint slide. On the slide I'm using hexagon shapes of different width. I want the sides of the hexagon to be shaped identically, regardless of the width of the hexagon. That is, the top and bottom sides change, while the other sides are absolute. This is not the case by default, but I found the Adjustment property which does the same work as the yellow diamond you use to adjust the shapes. Assuming I create my shape like below, what value would I use for Adjustments that will make the sides look the same regardless of width?

Set pptShp = pptSld.Shapes.AddShape(msoShapeHexagon, dStartX, dStartY, dEndX - dStartX, 14)
pptShp.Adjustments(1) = ?

Many thanks,

Gustaf
 
H

Hachi N

Hello,

I had the same problem and I found a value in Shp.Adjustments.Item(1) means a length from the left-top corner to the yellow diamond. The length is relative to the height of hexagon.
So, following command gives you a perfect hexagon :)

pptShp.Adjustments.Item(1)=1/2/3^0.5
(or =0.288675135)

bye,
Hachi
 
H

Hachi N

Hello,

I had the same problem and I found a value in Shp.Adjustments.Item(1) means a length from the left-top corner to the yellow diamond. The length is relative to the height of hexagon.
So, following command gives you a perfect hexagon :)

pptShp.Adjustments.Item(1)=1/2/3^0.5
(or =0.288675135)

bye,
Hachi
 

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