Method to modify a line shape end points in Powerpoint? RRS feed

  • Question

  • Is there a way to modify a line shape's end points?

    Am I stuck using Top, Left, Height, Width, FlipHorizontal, and FlipVertical.

    Is there a way to determine orientation of a line when the Height or Width is 0?

    I would need to determine orientation to know when to flip and when not to flip.

    Anyone worked this out in a simple method?

    Tuesday, May 1, 2012 3:08 PM

All replies

  • Hi Willian,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that there has no method to approach your goal. You need Height and Width property for your line. You will never see them if you set zero of them.

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 3, 2012 2:48 AM
  • Thanks Tom,

    It was a difficult problem.

    I was able to work it out with other conditions in the file.

    The following link to a .ppsm file will give you an idea of solution.!179&parid=878EA173A717DF66!178

    (The link above will take you to a preview. Download the file to interact with the shapes. I hope that wasn't too confusing.) 

    The toggle button at the bottom left of the slide toggles the state between two types of actions.

    Modify Adjacencies - clicking one oval and then another connects them with a line.

    Modify Layout - clicking(not draging) an oval will let you move it on the slide. A second click will place it.

    All of the lines are transformed using Left, Width, Top, Height properties and the Flip method.

    By the way, the parameter values msoFlipHorizontal and msoFlipVertical work backwards of what you might think. Flipping about a horizontal axis uses msoFlipVertical and flipping about a vertical axis uses msoFlipHorizontal.

    Sorry the code is hidden for now. I am still finishing things up. Once it is out of the sketching stage, I can post the source.



    • Edited by William Sessums Thursday, May 3, 2012 3:41 PM better instructions
    Thursday, May 3, 2012 3:25 PM