Feiertage im Domino Directory kopieren
Manfred Meise 4 Januar 2012 18:58:00
Option Public
Option Declare
'Begin DNT
Const ACCT_NAME = "AccountName"
Const ACCT_TYPE = "Account"
Const HOLIDAY_TYPE = "Holiday"
Const HOLIDAY_ID = "APPTUNID"
Const TYPE_FIELD = "Type"
'End DNT
Sub Initialize
Dim ws As New NotesUIWorkspace
Dim uidb As NotesUIDatabase
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim strName As String
Dim str1, str2 As String
str1 = "Copy of "
Set uidb = ws.currentdatabase
Set db = uidb.Database
Set dc = db.UnprocessedDocuments
Set doc = dc.getfirstdocument
While Not doc Is Nothing
Select Case doc.getitemvalue(TYPE_FIELD)(0)
Case ACCT_TYPE
strName = doc.getitemvalue(ACCT_NAME)(0)
Call doc.ReplaceItemValue(ACCT_NAME, str1 + strName)
Call doc.save(True, False)
Case HOLIDAY_TYPE
Call doc.ReplaceItemValue (HOLIDAY_ID, doc.Universalid)
Call doc.save(True, False)
End Select
Set doc = dc.getnextdocument(doc)
Wend
End Sub
Um defekte Feiertagsdokumente zu reparieren, sind diese danach auszuschneiden/einzufügen.
Zielgruppe: Entwickler Administrator Kategorien: Datenbankpflege Kalender Diskussion: Kommentare [0]