Export (0) Print
Expand All

Data3 Property [Visio 2003 SDK Documentation]

Office 2003

Gets or sets the value of the Data3 field for a Shape object.

strRet = object.Data3

object.Data3 = stringExpression

strRet     String. The current value of the field.

object     Required. An expression that returns a Shape object.

stringExpression     Required String. The new value for the field.

Version added

2.0

Remarks

Use the Data3 property to supply additional information about a shape. The property can contain up to 64 KB of characters. Text controls should be used with care with a string that is greater than 3,000 characters.

Setting the Data3 property is equivalent to entering information in the Data 3 box in the Special dialog box (Format menu).

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to set a shape's Data1, Data2, and Data3 fields. It prints the values of these fields 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


Applies to | Shape object



Show:
© 2015 Microsoft