Edit

Share via


Addons.Add method (Visio)

Adds a new Addon object to an Addons collection.

Syntax

expression.Add (FileName)

expression A variable that represents an Addons object.

Parameters

Name Required/Optional Data type Description
FileName Required String The name of the add-on.

Return value

Addon

Remarks

The Add method adds an EXE or VSL file to the collection and returns an Addon object if the string expression specifies an EXE file, or Nothing if the string expression specifies a VSL file.

Example

The following macro shows how to add an Addon object to the Addons collection.

Before running this macro, replace path\filename with a valid path and file name for an add-on in your Visio project.

Public Sub AddAddon_Example() 
 
 Dim vsoAddons As Visio.Addons 
 Dim vsoAddon As Visio.Addon 
 
 'Add an add-on to the Addons collection. 
 Set vsoAddons = Visio.Addons 
 Set vsoAddon = vsoAddons.Add("path\filename") 
 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.