ConnectorFormat.BeginConnectionSite-Eigenschaft (Publisher)

Gibt einen Long, der angibt, der Verbindungsseite an der der Anfang einer Verbindung ansetzt. Schreibgeschützt.

Syntax

Ausdruck. BeginConnectionSite

Ausdruck Eine Variable, die ein ConnectorFormat-Objekt darstellt.

Rückgabewert

Long

HinwBemerkungeneise

Wenn der Anfang der angegebenen Verbindung nicht an einer Form ansetzt, wird durch diese Eigenschaft ein Fehler verursacht.

Verwenden Sie die EndConnectionSite -Eigenschaft, um die Verbindungsseite zurückzugeben, an der das Ende einer Verbindung ansetzt.

Beispiel

This example assumes that the first page in the active publication already contains two shapes attached by a connector named Conn1To2. The code adds a rectangle and a connector to the first page. The beginning of the new connector will be attached to the same connection site as the beginning of the connector named Conn1To2, and the end of the new connector will be attached to connection site one on the new rectangle.

Dim shpNew As Shape 
Dim intSite As Integer 
Dim shpOld As Shape 
 
With ActiveDocument.Pages(1).Shapes 
 
 ' Add new rectangle. 
 Set shpNew = .AddShape(Type:=msoShapeRectangle, _ 
 Left:=450, Top:=190, Width:=200, Height:=100) 
 
 ' Add new connector. 
 .AddConnector(Type:=msoConnectorCurve, _ 
 BeginX:=0, BeginY:=0, EndX:=10, EndY:=10) _ 
 .Name = "Conn1To3" 
 
 ' Get connection site number of old shape, and set 
 ' reference to old shape. 
 With .Item("Conn1To2").ConnectorFormat 
 intSite = .BeginConnectionSite 
 Set shpOld = .BeginConnectedShape 
 End With 
 
 ' Connect new connector to old shape and new rectangle. 
 With .Item("Conn1To3").ConnectorFormat 
 .BeginConnect ConnectedShape:=shpOld, _ 
 ConnectionSite:=intSite 
 .EndConnect ConnectedShape:=shpNew, _ 
 ConnectionSite:=1 
 End With 
End With

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.