Forcer IsSummary pour tous les champ d'un Document

Forcer IsSummary pour tous les champ d'un Document

Messagepar Michael DELIQUE » 06 Jan 2010 à 17:00

Code : Tout sélectionner
Public Sub FieldAllisSummary(wDoc As NotesDocument,wnbIsSum As Integer,wnbSave As Integer)
         'Déclaration Variable
   Dim Item As NotesItem
   Dim vrItem As Variant
   
   On Error Goto ErreurHandle
   
   If wDoc Is Nothing Then
      Error 9999,"wDoc is Nothing"
      Exit Sub
   End If
   
   Select Case wnbIsSum
   Case True,False
            'ok
   Case Else
      Error 9999,"wnbIsSum no ''True'' or ''False'' Value"
      Exit Sub
   End Select
   
   vrItem = wDoc.Items
   Forall ValueItem In vrItem
      Set Item = ValueItem
      If Not Item Is Nothing Then
         Item.IsSummary = wnbIsSum
      End If
      Set Item = Nothing
   End Forall
   vrItem = Null
   If wnbSave = True Then
      Call wDoc.save(True,False)
   End If
   
   Exit Sub
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 !"
   Exit Sub
End Sub
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
Avatar de l’utilisateur
Michael DELIQUE
Administrateur
Administrateur
 
Message(s) : 12183
Inscrit(e) le : 16 Déc 2004 à 10:36
Localisation : Paris/Cergy

Retour vers Gestion des champs