' When LotusScript loads the module, Initialize saves
' the name of the current working directory.
Dim startDir As String
Sub Initialize ' Store the current directory.
startDir$ = CurDir$
End Sub
' The module changes the working directory.
' ...
' ...
' When LotusScript unloads the module, Terminate changes the
' working directory back to what it was when the module was
' loaded.
Sub Terminate ' Return to the startup directory.
ChDir startDir$
End Sub