J'ai des mail qui ont été chiffré par erreur dans une bal et j'aimerai les déchiffré.
J'ai essayer :
- Code : Tout sélectionner
doc.encrypt="0"
mais ça ne marche pas, les mails restent chiffré.
Cordialement
doc.encrypt="0"Dim session As New notessession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim collection As NotesDocumentCollection
Dim i As Integer
Dim encryptFlag As Variant
Dim item As NotesItem
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
i=1
Set doc = collection.GetFirstDocument()
encryptFlag = doc.getItemValue("Encrypt")
If encryptFlag(0) = "1" Then
Call doc.ComputeWithForm( True, False )
Set item = doc.ReplaceItemValue( "Encrypt", "0")
'ou bien utiliser cette ligne à la place de la ligne au dessus
'call doc.ReplaceItemValue( "Encrypt", "0")
Call doc.Save( True, True )
End If
Print "décryptage du document " + Cstr(I) + " sur " + Cstr(db.UnprocessedDocuments.Count)
I=I+1
Set doc = collection.GetNextDocument(doc)
Dim session As New notessession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim collection As NotesDocumentCollection
Dim i As Integer
Dim encryptFlag As Variant
Dim item As NotesItem
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
i=1
Set doc = collection.GetFirstDocument()
Call doc.removeitem("$Seal")
Call doc.removeitem("$SealData")
Call doc.removeitem("Encrypt")
Call doc.save(True, False)
Print "décryptage du document " + Cstr(I) + " sur " + Cstr(db.UnprocessedDocuments.Count)
I=I+1
Set doc = collection.GetNextDocument(doc)