Visual Basic Reference
SourceDoc Property
See Also Example Applies To
Returns or sets the filename to use when you create an object.
Note You set the SourceDoc property for compatibility with the Action property in earlier versions. For current functionality, use the CreateEmbed and CreateLink methods.
Syntax
object**.SourceDoc** [ **=**name]
The SourceDoc property syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
name | A string expression specifying a filename. |
Remarks
Use the SourceDoc property to specify the file to be linked when creating a linked object using the Action property. Use the SourceItem property to specify data within the file to be linked.
When creating an embedded object using the Action property, if the SourceDoc property is set to a valid filename, an embedded object is created using the specified file as a template.
When a linked object is created, the SourceItem property is concatenated to the SourceDoc property. At run time, the SourceItem property returns a zero-length 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"