Das Notes Forum
Domino 9 und frühere Versionen => Administration & Userprobleme => Thema gestartet von: kloeti am 06.05.02 - 10:45:20
-
Sali zämme ... ;D
Hab da ein Problem :-/
Man kann doch bei einer Maildatenbank mit dem Designer, wenn man bei den Folders auf die Properties geht und dann den Design Tab anwählt eine Checkbox markieren, die 'Prohibit design refresh or replace to modify' heisst.
Kann man irgendwie automatisieren dass diese Checkbox markiert wird?
Habe festgestellt, wenn diese Checkbox nicht markiert ist, dass bei einem Designreplace alle Folders in der jeweiligen Maildatenbank verschwinden.
Hat jemand eine Idee, bevor ich 300 Mailboxen durchklicken muss ???
Bin für jede Hilfe dankbar.
Gruzz ;D
kloeti
-
Hier ein kleiner fleissiger Agent, der den Job macht ;D
Dim s As New NotesSession
Dim db As NotesDatabase
Dim uniqid As String
Dim count As Integer
Dim emaildbs As String
Set db = s.CurrentDatabase
dbdir = Inputbox("What directory do you want to run this against?" , "Directory", "mail")
dbfile = Inputbox$("What file do you want to run this against? (blank for whole dir)" , "File", "")
If dbdir = "" Then
Exit Sub
End If
If dbfile <> "" Then
emaildbs = dbfile
Else
emaildbs = Dir$("f:\notes\data\" & dbdir & "\*.nsf")
End If
While emaildbs <> ""
dbname = dbdir & "\" & emaildbs
count = 0
Dim om As New NotesDatabase("","")
If Not(om.Open(db.Server, dbname)) Then
Msgbox "Could not open a mail database....Exiting!"
Exit Sub
End If
Forall Views In om.Views
If Views.IsFolder Then
count = count + 1
uniqid = Views.UniversalID
Set doc = om.GetDocumentByUNID(uniqid) 'This line treats the folder like a NotesDocument to access the field called $Flags
Set flags = doc.GetFirstItem("$Flags")
If Not (flags.Text Like "*P*") Then
flags.Values = flags.Text & "P"
Call doc.Save(True, False)
entrytext = Views.Name & " in " & emaildbs & " has been protected!"
Print entrytext
Else
entrytext = Views.Name & " in " & emaildbs & " is already protected!"
Print entrytext
End If
End If
End Forall
'entrytext = "In " & emaildbs & " database, " & count & " folders have been processed!"
'Msgbox entrytext
If (dbfile <> "") Then
emaildbs = ""
Else
emaildbs = Dir$()
End If
Wend
End Sub
-
eknori Du bist der Grösste ... sollte es mal ein Usertreffen geben, dann erinnere mich daran, dass ich Dir eine Karaffe Basler Ueli Bier mitbringe ;D
Gruzz
kloeti
-
da gibts auch einen task, der dies erledigt......
http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/a288387488cb5d75852569c300778837?OpenDocument&Highlight=0,folder
leider auch nur für nt :'(
da ich solaris hab, hilft mir das alles nix