AddonPaths property

Microsoft Visio Developer Reference

AddonPaths property

   Example   

Gets or sets the paths where Microsoft Visio looks for add-ons.

Version added

4.0

Syntax

strRet = object.AddonPaths
object.AddonPaths = strPaths

strRet

String. A list of folders.

object

Required. An expression that returns an Application object.

strPaths

Required String. A text string containing a list of folders. Use semicolons to separate individual folders in the string.

Remarks

To indicate more than one folder in the path where Visio looks for add-ons, separate individual items in the path string with semicolons.

The string passed to and received from the AddonPaths property is the same string shown on the File Paths tab in the Options dialog box (click Options on the Tools menu). This string is stored in HKEY_CURRENT_USER\Software\Microsoft\Visio\application\AddonsPath.

When Visio looks for add-ons, it looks in all paths named in the AddonPaths property and all the subfolders of those paths. If you pass the AddonPaths property to the EnumDirectories method, it returns a complete list of fully qualified paths in which Visio looks.

If a path is not fully qualified, Visio 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 AddonPaths property is "Add-ons;d:\Add-ons", Visio looks for add-ons in both c:\Visio\Add-ons and d:\Add-ons.