TargetDocumentName property

Microsoft Visio Developer Reference

TargetDocumentName property

   Example   

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

Version added

2000

Syntax

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.

Remarks

If the target document is moved, deleted, or renamed, or 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 on the File Path tab in the Options dialog box (click Options on the Tools menu, 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.