Adjustments on msoShapeHexagon

  • Thread starter Thread starter Gustaf
  • Start date Start date
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
 
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
 
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
 
Back
Top