InvisibleApp.StartupPaths Property
Visio Automation Reference |
Gets or sets the paths where Microsoft Office Visio looks for third-party and user add-ons to run when the application is started. Read/write.
Version Information
Version Added: Visio 4.0
Syntax
expression.StartupPaths
expression A variable that represents an InvisibleApp object.
Return Value
String
Remarks
The StartupPaths property is set to an empty string ("") by default.
The string passed to and received from the StartupPaths property is the same string shown in the File Paths dialog box. (On the Tools menu, click Options, click the Advanced tab, and then click File Paths.) This string is stored in the HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Visio\Application\StartupPath subkey.
When the application looks for third-party and user startup add-on files, it looks in all paths named in the StartupPaths property, as well as at the paths of any startup add-ons installed at setup, and all the subfolders of those paths. If you pass the StartupPaths property to the EnumDirectories method, it returns a complete list of fully qualified paths in the folders passed in.
Setting the StartupPaths property replaces existing values for StartupPaths in the File Paths dialog box. To retain existing values, get the existing string and then append the new file path to that string, as shown in the following code:
Visual Basic for Applications |
---|
|
** Warning ** Modifying the Microsoft Windows registry in any manner, whether through the Registry Editor or programmatically, always carries some degree of risk. Incorrect modification can cause serious problems that may require you to reinstall your operating system. It is a good practice to always back up a computer's registry first before modifying it. If you are running Microsoft Windows NT or Microsoft Windows 2000, you should also update your Emergency Repair Disk (ERD).
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the StartupPaths property to add a path to the Start-up paths list.
Visual Basic for Applications |
---|
|
See Also