Share via


TargetDocumentName Property [Visio 2003 SDK Documentation]

Gets and sets the path and file name of a Microsoft Office Visio document (usually a stencil) that contains the master to which a master shortcut refers.

strRet = object**.TargetDocumentName**

object**.TargetDocumentName** = strExpression

strRet     String. Path and file name of the document.

object     Required. An expression that returns a MasterShortcut object.

strExpression     Required String. The new path and file name of the document.

Version added

2000

Remarks

If the target document is moved, deleted, or renamed, or if the property is set to the path of a nonexistent file, the application will not be able to access the shortcut's target master. As a result, the end user will not be able to use the shortcut to drop shapes onto their drawing.

If the TargetDocumentName property contains a file name but no path, the application looks for the target document in the file path set in the File Path dialog box (click Options on the Tools menu, click the Advanced tab, and then click File Paths). The name may refer either to the document's file name or to one of its alternate file names. To set an alternate name for a document, use the AlternateNames property.

The TargetDocumentName property does not support file names with relative paths.

Applies to | MasterShortcut object

See Also | AlternateNames property | CreateShortcut method