TemplatePaths property

Microsoft Visio Developer Reference

TemplatePaths property

       

Gets or sets the paths where Microsoft Visio looks for templates. To indicate more than one folder, separate individual items in the path string with semicolons.

Version added

4.0

Syntax

strRet = object.TemplatePaths
object.TemplatePaths = pathsStr

strRet

String. A text string containing a list of folders.

object

Required. An expression that returns an Application object.

pathsStr

Required String. A text string containing a list of folders.

Remarks

The string passed to and received from the TemplatePaths property is the same string shown on the File Paths tab in the Options dialog box (click Options on the Tools menu, and then click File Paths).

When the application looks for templates, it looks in all paths named in the TemplatePaths property and all the subfolders of those paths. If you pass the TemplatePaths property to the EnumDirectories method, it returns a complete list of fully qualified paths in which the application looks.

If a path is not fully qualified, the application looks for the folder in the folder that contains the Visio program files (appObj.Path). For example, if the Visio executable file is installed in c:\Visio, and the TemplatePaths property is "Templates;d:\Templates", the Visio application looks for templates in both c:\Visio\Templates and d:\Templates.