par s001001 » 14 Août 2003 à 08:11
Bonjour,il n'y pas rien d'intégré comme dans outlookmaintenant moi j'utilise un agent qui remonte qqs infos, a toi d'enrichir en fonction des champs souhaités :Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim dc As NotesDocumentCollection Dim doc As NotesDocument Set db = session.CurrentDatabase Dim newdoc As New NotesDocument( db ) Set dc = db.UnprocessedDocuments Set doc = dc.GetFirstDocument ' create Body item for new memo and set the subject and form Dim rtitem As New NotesRichTextItem( newdoc, "Body" ) Set item = doc.getfirstitem("Subject") If item Is Nothing Then item.text = "<no subject>" End If newdoc.Subject = "SMTP Header info for: " + item.text newdoc.From = "Memo" ' the next section grabs smtp header items from selected doc and places it into a new memo Set item = doc.getfirstitem("MIME_VERSION") If Not (item Is Nothing) Then Call rtitem.AppendText( "MIME_VERSION = " + item.text + Chr(10) + Chr(13) ) End If Set item = doc.getfirstitem("SMTPOriginator") If Not (item Is Nothing) Then Call rtitem.AppendText( "SMTPOriginator = " + item.text + Chr(10) + Chr(13) ) End If Set item = doc.getfirstitem("From") If Not (item Is Nothing) Then Call rtitem.AppendText( "From = " + item.text + Chr(10) + Chr(13) ) End If Set item = doc.getfirstitem("SendTo") If Not (item Is Nothing) Then Call rtitem.AppendText( "SendTo = " + item.text + Chr(10) + Chr(13) ) End If Set item = doc.getfirstitem("CopyTo") If Not (item Is Nothing) Then Call rtitem.AppendText( "CopyTo = " + item.text + Chr(10) + Chr(13) ) End If Set item = doc.getfirstitem("BlindCopyTo") If Not item Is Nothing Then Call rtitem.AppendText( "BlindCopyTo = " + item.text + Chr(10) + Chr(13) + Chr(10) + Chr(13) ) End If Set item = doc.getfirstitem("Received") Do Until item Is Nothing Call rtitem.AppendText( "Received = " + item.text + Chr(10) + Chr(13) + Chr(10) + Chr(13) ) item.remove Set item = doc.getfirstitem("Received") Loop Call rtitem.AddNewLine( 1, True ) ' sends the new memo to specified address and closes the open one Call newdoc.send( False, session.username)End Sub