How to set the line's cap property?

  • Thread starter Thread starter lai
  • Start date Start date
L

lai

HI

How can I set the line's cap property?
I know I can click the line and change the line cap to round or flat
from the properties dialog.
But how can I do it from code? Didn't seen anything from the vb
reference or ppt 2007 reference?

Thanks
Yujing
 
Assuming the selected shape is a line.

With ActiveWindow.Selection.ShapeRange(1)
.Line.BeginArrowheadStyle = msoArrowheadDiamond
.Line.EndArrowheadStyle = msoArrowheadTriangle
End With

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm
 
Hi Shyam,

Thank you for your reply.
I should make the question clearer.
What I want to set is the line cap not the arrowhead's style.

For example, if we set a line's width big enough, we can see the begin
or the end point of the line, it can be
flat:
________________________
I________________________I

or round:

_____________________________
(_____________________________)

I can set this property by selecting the line and then open the
property dialog, there is a dropdown menu called "cap"
How can I control this from code?

Thanks
Yujing
 
I don't see it. But a way around would be to keep copies line shapes in
another ppt and then apply the styles from. The whole exercise might be too
cumbersome since then you will need to restore the other properties back
after it.

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm

Hi Shyam,

Thank you for your reply.
I should make the question clearer.
What I want to set is the line cap not the arrowhead's style.

For example, if we set a line's width big enough, we can see the begin
or the end point of the line, it can be
flat:
________________________
I________________________I

or round:

_____________________________
(_____________________________)

I can set this property by selecting the line and then open the
property dialog, there is a dropdown menu called "cap"
How can I control this from code?

Thanks
Yujing
 
Back
Top