ConnectorFormat.BeginDisconnect メソッド (Publisher)

指定されたコネクタの始点を、接続している図形から切り離します。

構文

BeginDisconnect

ConnectorFormat オブジェクトを表す変数。

注釈

このメソッドは、コネクタのサイズや位置を変更しません。コネクタの先頭は接続サイトに配置されたままですが、接続されなくなりました。

コネクタ図形の始点に 残ります を使用します。

次の使用例は、作業中の文書の先頭ページに 2 つの四角形を追加し、それらにコネクタを接続します。次に、コネクタの経路が最短になるように自動的に再接続し、コネクタを四角形から切り離します。

Dim shpRect1 As Shape 
Dim shpRect2 As Shape 
 
With ActiveDocument.Pages(1).Shapes 
 
 ' Add two new rectangles. 
 Set shpRect1 = .AddShape(Type:=msoShapeRectangle, _ 
 Left:=100, Top:=50, Width:=200, Height:=100) 
 Set shpRect2 = .AddShape(Type:=msoShapeRectangle, _ 
 Left:=300, Top:=300, Width:=200, Height:=100) 
 
 ' Add a new connector. 
 With .AddConnector(Type:=msoConnectorCurve, _ 
 BeginX:=0, BeginY:=0, EndX:=0, EndY:=0) _ 
 .ConnectorFormat 
 
 ' Connect the new connector to the two rectangles. 
 .BeginConnect ConnectedShape:=shpRect1, ConnectionSite:=1 
 .EndConnect ConnectedShape:=shpRect2, ConnectionSite:=1 
 
 ' Reroute the connector to create the shortest path. 
 .Parent.RerouteConnections 
 
 ' Disconnect the new connector from the rectangles but 
 ' leave in place. 
 .BeginDisconnect 
 .EndDisconnect 
 End With 
 
End With 

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。