par Michael DELIQUE » 06 Nov 2007 à 13:39
Ouvre une boite de dialogue pour selectionner le fichier a enregistrer
- Code : Tout sélectionner
Public Function FileSaveBox_API(wTitle As String, wFilter As String) As String
'Declare variables...
Dim FileName As String*256
Dim Filter As String
%REM
'variableAPI pour la fonction FileSaveBox_API
Declare Function NEMPutFile Lib "nnotesws" ( wHandle As Integer, Byval szFileName As String, Byval szFilter As String, Byval szTitle As String ) As Integer
%END REM
On Error Goto ErreurHandle
FileSaveBox_API = ""
Filename = Chr(0)
' exemple filtre Filter = "All Files |*.*|Word Document |*.doc|Text Files|*.txt|"
If Trim( wFilter) = "" Then
Filter = "All Files |*.*"
Else
Filter = wFilter
End If
If NEMPutFile( 0, FileName, Filter, wTitle) <> 0 Then
FileSaveBox_API = FileName
End If
Exit Function
ErreurHandle:
Msgbox "("+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
FileSaveBox_API = ""
Exit Function
End Function
Cordialement
Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN