par michel » 31 Mars 2004 à 08:32
J'ai rencontré le même problème chez un utilisateur.Passe ce code après restauration de la base, cela devrait mettre un peu d'ordre dans les dossiers.Sub Click(Source As Button) Dim s As New notessession Dim w As New notesuiworkspace Dim doc As notesdocument Dim db As notesdatabase Dim Template As String Set db=s.currentdatabase Template = db.DesignTemplateName ViewCount=0 FolderCount=0 ProtectCount=0 Forall view In db.views ViewCount=ViewCount+1 viewUNID = view.universalid Set doc = db.getdocumentbyUNID(view.universalID) TitleString = doc.getitemvalue("$Title") If Instr(1,TitleString(0),"$",0)<>1 And Instr(1,TitleString(0),"(",0)<>1 Then Flags = doc.getitemvalue("$Flags") FolderFlag = Instr(1,Flags(0),"F",0) If (Not Isnull(FolderFlag) And FolderFlag<>0 And Instr(1,Flags(0),"p",0)=0) Then FolderCount=FolderCount+1 If Instr(1,Flags(0),"P",0)=0 Then ProtectCount=ProtectCount+1 AddCapitalP = Flags(0) & "P" Call doc.replaceitemvalue("$Flags", AddCapitalP) Call doc.save(1,1) Call doc.save(1,1) End If End If End If End Forall Messagebox Cstr(ViewCount) & " Design Notes found of class View" & Chr(10) & _ Cstr(FolderCount) & " Folders found that were not Private" & Chr(10) & _ Cstr(ProtectCount) & " were marked not to Refresh/Replace" _ ,,"Database modification completed" End Sub