This site will look better if you upgrade to a browser that supports web standards.
This technique is useful for ensuring that an add-in (or other file) is automatically added to the menu. Put this in a regular code module in the add-in:
Public Sub AutoExec() WorkMenuItems.Add ThisDocument End Sub
or regular document:
Public Sub AutoOpen() WorkMenuItems.Add ThisDocument End Sub
To then automatically unload the add-in/file from the
menu:Public Sub AutoExit() Dim i As Long For i = 1 To WorkMenuItems.Count With WorkMenuItems(i) If ThisDocument.FullName = .Path & _ Application.PathSeparator & .Name Then _ .Delete End With Next i End Sub
This page last updated
© Copyright 2001 - 2004 McGimpsey and Associates. Except where noted, all code on this site may be distributed under the Gnu GPL. Acknowledgement is appreciated.