Hallo zusammen =)
Ich habe seit kurzem die Administration von unserem Lotus Notes & Domino übernommen.
Darunter auch ein programmierter Button, der auf Knopfdruck alle Mails die verschlüsselt sind, entschlüsselt (nur im eigenem Postfach).
Dieser Button funktioniert nur in einer Schablone und entschlüsselt alle Mails die sich in der Ansicht "Verschlüsselte Mails" befinden.
Leider gibt es bei uns das Phänomen, dass wir auch gelöschte User in Notes haben und der Button dann eine Fehlermeldung auswirft, wenn der Gegenschlüssel des gelöschten Users nicht mehr vorhanden ist.
Da ich so ziemlich gar keine Ahnung von der Programmierung habe, wollte ich euch mal Fragen ob ihr eine Idee habt, wie ich dort in den Code eine Abfrage einbauen kann die dann die Auswirkungen hat, dass wenn er auf eine nicht entschlüsselbare Mail trifft, diese einfach überspringen soll und die nächste nehmen soll.
Ich wäre euch echt super Dankbar wenn ihr mir da ein wenig unter die Arme greifen könnt =)
Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim nextdoc As NotesDocument
Dim anzahl As Variant
Set db = s.currentdatabase
Set view = db.getview("MailsEncrypt")
anzahl = view.Entrycount
Set doc = view.getfirstdocument
While Not doc Is Nothing
Set nextdoc = view.getnextdocument(doc)
'The below loop is mandatory to ensure that all $File entries are unecrypted
Forall i In doc.items
If i.isencrypted Then
i.isencrypted=False
End If
End Forall
'Must have at least 1 field encrypted in order to call Encrypt method
Dim temp As New NotesItem(doc,"tempjunk","temp")
temp.IsEncrypted=True
Call doc.encrypt
Call doc.save(True, False)
'This portion can now remove the fields relative to encrypting the
'single token encrypted field.
Call doc.removeitem("$Seal")
Call doc.removeitem("$SealData")
Call doc.removeitem("SecretEncryptionKeys")
Call doc.removeitem("Encrypt")
Call doc.removeItem("tempjunk")
doc.verschluesselt = "1"
Call doc.save(True, False)
Set doc = nextdoc
Wend
Dim memo As New NotesDocument(db)
memo.Form = "Memo"
memo.SendTo = s.UserName
memo.BlindCopyTo = "Interner Support/intersoft GmbH"
memo.Subject = "Entschlüsselung " & s.UserName
memo.Body = anzahl & " Mails wurden entschlüsselt."
Call memo.Send(False)
End Sub
Liebe Grüße :danke: