我正在尝试使用连接线连接到形状的节点,这是我的代码,任何人都可以帮忙解决这个问题。
With ActiveWindow.Selection.SlideRange(1).Shapes.AddConnector(Type:=msoConnectorStraight, BeginX:=0, _
BeginY:=0, EndX:=100, EndY:=100).ConnectorFormat
.BeginConnect ConnectedShape:=Shp, ConnectionSite:=3
.EndConnect ConnectedShape:=Shp, ConnectionSite:=1
.Parent.RerouteConnections
End With
答案 0 :(得分:0)
ConntectedShape
不应该指的是不同的形状,还是这里的拼写错误?
With ActiveWindow.Selection.SlideRange(1).Shapes.AddConnector(Type:=msoConnectorStraight, _
BeginX:=0, BeginY:=0, EndX:=100, EndY:=100).ConnectorFormat
.BeginConnect ConnectedShape:=Shp, ConnectionSite:=3 ' <-- Shp1?
.EndConnect ConnectedShape:=Shp, ConnectionSite:=1 ' <-- Shp2?
.Parent.RerouteConnections
End With