par Michael DELIQUE » 05 Sep 2007 à 09:29
- Code : Tout sélectionner
Function FolderList(wDB As NotesDatabase) As Variant
'Déclaration Variable
Dim DBCible As NotesDatabase
Dim lstValue List As String
Dim i As Integer
On Error Goto ErreurHandle
If Session Is Nothing Then
Set Session = New NotesSession
End If
If wDB Is Nothing Then
Set DBCIble = Session.CurrentDatabase
Else
Set DBCible = wDB
End If
i = -1
Forall View In DBCible.Views
If Not view Is Nothing Then
i = i+1
If View.isfolder = True Then
If Not Isempty(View.aliases) Then
lstValue(i) = View.aliases(0)
Else
lstValue(i) = View.name
End If
End If
End If
End Forall
Call SortingList(lstValue,"C")
FolderList = lstValue
Erase lstValue
Exit Function
ErreurHandle:
Msgbox "("+Cstr(Getthreadinfo(1))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+"."+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
Erase lstValue
lstValue(0) = ""
FolderList = lstValue
Erase lstValue
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