j'essaye de traiter le contenu d'une vue, le but étant de passer par le front-end pour transformer un champ RT en type Mime/Html.
Au bout du 25eme document, j'ai le message "Impossible de repousser la fermeture du document".
Si qqun a une explication à ce problème, je suis preneur.
ci-dessous mon agent
- Code : Tout sélectionner
Sub Initialize
%REM
Conversion en type Mime
%END REM
'Déclarations
Dim ws As NotesUIWorkspace
Dim s As NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection
Dim UIdoc As NotesUIDocument
Dim doc As NotesDocument
Dim nbTot, nbTrt As Integer
On Error Goto Catch
Try:
'Initialisations
Set ws = New NotesUIWorkspace
If s Is Nothing Then Set s = New NotesSession
Set db = s.CurrentDatabase
'Traitement des documents de la vue
Set view = db.GetView("vFusion")
Set vc = view.AllEntries
nbTot = vc.Count
nbTrt = 0
Set entry = vc.GetFirstEntry
While Not(entry Is Nothing) And nbTrt < 24
'While Not(entry Is Nothing)
Set doc = entry.Document
Set UIdoc = ws.EditDocument(True,doc)
Call UIdoc.FieldSetText("Form","Memo")
Call UIdoc.Save
Call UIdoc.Close
nbTrt = nbTrt + 1
Print "Avancement " & nbTrt & "/" & nbTot & " traités."
Set entry = vc.GetNextEntry(entry)
Wend
Goto Finally
Catch:
'Gestion des erreurs
Msgbox "Erreur n° " & Err & " : " & Error$ & " à la ligne " & Erl,16, Lsi_info(2)
Resume Finally
Finally:
End Sub