Table of contents

Documents.ShapeLinkAdded 事件 (Visio)Documents.ShapeLinkAdded Event (Visio)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

在形状链接到数据行之后发生。Occurs after a shape is linked to a data row.

请注意 此 Visio 对象或成员是仅供授权用户的 Visio 专业 2013年。Note This Visio object or member is available only to licensed users of Visio Professional 2013.


专用子_表达式__ShapeLinkAdded( ByVal 形状为 [IVSHAPE]ByVal DataRecordsetID 作为长ByVal DataRowID 作为长)Private Sub expressionShapeLinkAdded( **_ByVal Shape As [IVSHAPE]** , ByVal DataRecordsetID As Long , ByVal DataRowID As Long )

表达式_该表达式返回一个文档对象。_expression An expression that returns a Documents object.


名称Name必需/可选Required/Optional数据类型Data Type说明Description
形状Shape必需Required[IVSHAPE][IVSHAPE]链接到数据的形状。The shape that is linked to data.
DataRecordsetIDDataRecordsetID必需RequiredLongLong包含链接到形状的数据行的数据记录集的 ID。The ID of the data recordset containing the data row linked to the shape.
DataRowIDDataRowID必需RequiredLongLong链接到形状的数据行的 ID。The ID of the data row linked to the shape.


ShapeLinkAdded事件是一组EventInfo属性的应用程序对象包含额外信息的事件之一。The ShapeLinkAdded event is one of a group of events for which the EventInfo property of the Application object contains extra information.

当引发ShapeLinkAdded事件时, EventInfo属性将返回以下字符串:When the ShapeLinkAdded event is fired, the EventInfo property returns the following string:

/DataRecordsetID = n /DataRowID = m

其中_n_, m_表示的数据记录集和数据行 Id 分别与该事件关联。where _n and m represent the IDs of the data recordset and data row, respectively, associated with the event.

如果您使用 Microsoft Visual Basic 或 Visual Basic for Applications (VBA),则此主题中的语法描述的是一种通用而有效的事件处理方法。If you're using Microsoft Visual Basic or Visual Basic for Applications (VBA), the syntax in this topic describes a common, efficient way to handle events.

如果您想要创建您自己的事件对象,使用添加AddAdvise方法。若要创建一个事件对象,运行加载项,请使用Add方法,应用到事件列表集合。若要创建一个事件对象,该对象接收通知,请使用AddAdvise方法。若要查找您想要创建的事件的事件代码,请参阅事件代码If you want to create your own Event objects, use the Add or AddAdvise method. To create an Event object that runs an add-on, use the Add method as it applies to the EventList collection. To create an Event object that receives notification, use the AddAdvise method. To find an event code for the event you want to create, seeEvent codes.

© 2018 Microsoft