SourceItem Property

See Also3N9AAJD              Example3N3AMKG>Low

Applies To

OLE control2HQDVVU.

Description

Determines the data within the file to be linked when you create a linked object.

Usage

[form.]ole.SourceItem [ = stringexpression ]

Remarks

OleTypeAllowed must be set to 0 (Linked) or 2 (Either) when using this property.  Use the SourceDoc property to specify the file to link.

Each object uses its own syntax to describe units of data.  To set this property, specify a unit of data recognized by the object.  For example, when you link to Microsoft Excel, you specify the SourceItem using a cell or cell-range reference such as "R1C1" or "R3C4:R9C22," or a named range such as "Revenues."

To determine the syntax to describe a unit of data for an object, see the documentation for the application that created the object.

 

Tip   You may be able to determine this syntax by creating a linked object at design time using the Paste Special command (click the OLE control with the right mouse button).  Once the object is created, select the SourceDoc property in the Properties window and look at the string in the Settings box.  For most objects, this string will contain a path to the linked file, followed by an exclamation point (!), or a backslash (\) and the syntax for the linked data.

 

When a linked object is created, the SourceItem property is concatenated to the SourceDoc property.  At run time, the SourceItem property returns an empty string ("") and the SourceDoc property returns the entire path to the linked file, followed by an exclamation point (!) or a backslash (\), followed by the SourceItem.  For example:

"C:\WORK\QTR1\REVENUE.XLS!R1C1:R30C15"

Data Type

String7WSH0XQ


See Also

Help:

Action Property04T78S3

Class PropertyVN4BZO

OleType Property12K24M2

OleTypeAllowed Property633XBW1

SourceDoc Property4200A12

 

Programmer's Guide:

Chapter 22, "Object Linking and Embedding (OLE)"