Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Powerpoint: Connect to Rectangle with a line

$
0
0

Greetings,

I have try with VB in Visual Studio to connect two Rectangles with a line, and then stick the line on the rectangle, so that if I move the rectangele the line stretches:

Dim Shape1 As PPApp.Shape = Nothing
Dim Shape2 As PPApp.Shape = Nothing

Shape1 = PPFolie.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeRectangle, X, Y, w, h)
Shape2 = PPFolie.Shapes.AddShape(Microsoft.Office.Core.MsoAutoShapeType.msoShapeRectangle, X + 50, Y + 50, w, h)

PFolie.Shapes.AddConnector(Microsoft.Office.Core.MsoConnectorType.msoConnectorElbow, X, Y, X + 50, Y + 50)
Shape1.ConnectorFormat.BeginConnect(Shape1, 1)
Shape2.ConnectorFormat.BeginConnect(Shape2, 1)

But the line is not connected to the rectangles.

Has anyonean idea?

Thank you!

     Michael


Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>