AddInState, AddInState()

Syntax

AddInState AddIn, Load

AddInState AddIn$, Load

AddInState(AddIn)

AddInState(AddIn$)

Remarks

The AddInState statement loads or unloads the specified global template or add-in listed in the Templates And Add-ins dialog box (Templates command, File menu). You can specify the global template or add-in as a number or as text.

Argument

Explanation

AddIn

A number corresponding to the global template or add-in's position in the list of global templates and add-ins, where 1 is the first template or add-in, 2 is the second, and so on

AddIn$

The path and filename of the global template or add-in

Load

Specifies whether to load or unload the global template or add-in:

0 (zero) Unloads the template or add-in

1 Loads the template or add-in


The AddInState() function returns the following values. Note that the return values are additive. For example, if the specified add-in is loaded, a WLL, and in the Startup folder, AddInState() returns 7 (the sum of 1, 2, and 4).

Value

Explanation

0 (zero)

If none of the following descriptions are true of the global template or add-in.

1

If the global template or add-in is loaded.

2

If it is a Word add-in library (WLL).

4

If the global template or add-in loads automatically; templates and add-ins in the folder specified by the Startup option on the File Locations tab in the Options dialog box (Tools menu) load automatically.


See Also

AddAddIn, ClearAddIns, CountAddIns(), DeleteAddIn, GetAddInID(), GetAddInName$()