Using Script Libraries |
After you create or add a script library to the Script Editor, you can call it by name from any document-level event or object event. For example, if you want to call a script library that is named "MyLibrary1" by using a function procedure, enter the following code into your script.
Function MyLibrary1()
End Function
If you want to call "MyLibrary1" by using a Sub procedure, use the following code.
Sub MyLibrary1()
End Sub
As you add code to a script library, individual functions and subroutines appear in "child" nodes under the script library name. You can call the entire library from script elsewhere in the document, or you can call the individual procedures and subroutines.