Domino 9 und frühere Versionen > Entwicklung
how I will modify the doc with an agent "Before New Mail Arrives" ?
(1/1)
Toma Bogdan:
I have a mail-in database and I want to modify a mail doc before arrive to this db. I created an agent with trigger "Before New Mail Arrives" but I will took this new doc and modify something in it ???
How does know the agent which is mail and which is not ? Based on internal variable "Form" of the form "Memo" :o
x !
Toma Bogdan:
the solution.... x ! anyway ::)
--- Code: ---Dim s As New notessession
Dim dbMail As notesdatabase
Dim NewMails As notesdocumentcollection
Dim mail As notesdocument
Set dbMail=s.currentdatabase
Set NewMails=dbMail.unprocesseddocuments
Set mail=NewMails.GetFirstDocument
While Not mail Is Nothing
mail.Name="YYY"
mail.save True, True
Call s.UpdateProcessedDoc( mail )
Set mail=NewMails.GetNextDocument(mail)
Wend
--- Ende Code ---
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln