oracle中msdatashape,Shape. Data1 属性 (Visio)

Shape. Data1 属性 (Visio)Shape.Data1 property (Visio)

06/08/2017

本文内容

获取或设置Shape对象的Data1字段的值。Gets or sets the value of the Data1 field for a Shape object. 读/写。Read/write.

语法Syntax

expression。expression. Data1

_表达式_一个代表**Shape** 对象的变量。expression A variable that represents a

返回值Return value

StringString

备注Remarks

使用Data1属性可提供有关形状的其他信息。Use the Data1 property to supply additional information about a shape. 该属性最多可包含 64 KB 的字符。The property can contain up to 64 KB of characters. 使用超过 3,000 个字符的字符串时应谨慎使用文本控制。Text controls should be used with care with a string that is greater than 3,000 characters. 设置Data1属性等效于在 "特殊" 对话框 (在 "开发工具" 选项卡上的 "形状设计" 组中单击 "形状名称") 中的 "数据 1 " 框中输入信息。Setting the Data1 property is equivalent to entering information in the Data 1 box in the Special dialog box (click Shape Name in the Shape Design group on the Developer tab).

示例Example

以下 Microsoft Visual Basic for Applications (VBA) 宏显示如何设置形状的Data1、 Data2和Data3属性。This Microsoft Visual Basic for Applications (VBA) macro shows how to set a shape's Data1, Data2, and Data3 properties. 它在“即时”窗口中输出这些属性的值。It prints the values of these properties in the Immediate window. 还可以通过打开 “特殊” 对话框确认已经设置了这些值。You can also verify that these values have been set by opening the Special dialog box.

Public Sub Data123_Example()

Dim vsoPage As Visio.Page

Dim vsoShape As Visio.Shape

Set vsoPage = Documents.Add("").Pages(1)

Set vsoShape = vsoPage.DrawRectangle(3, 3, 5, 5)

'Use the Data1, Data2, and Data3 properties to set

'the shape's Data fields.

vsoShape.Data1 = "Data1_String"

vsoShape.Data2 = "Data2_String"

vsoShape.Data3 = "Data3_String"

'Use the Data1, Data2, and Data3 properties to verify

'the shape's Data field values.

Debug.Print vsoShape.Data1

Debug.Print vsoShape.Data2

Debug.Print vsoShape.Data3

End Sub

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.

你可能感兴趣的:(oracle中msdatashape,Shape. Data1 属性 (Visio))