home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2004 August / PCWELT_8_2004.ISO / pcwsoft / pcwCopyMail.txt < prev    next >
Encoding:
Text File  |  2004-06-07  |  629 b   |  25 lines

  1. Sub Initialize
  2.     
  3.     Const sForward = "user@somewhere.de"
  4.     Dim session As New NotesSession
  5.     Dim note As NotesDocument
  6.     Dim docNew As Notesdocument
  7.     Dim db As NotesDatabase
  8.     Dim item As NotesItem
  9.     
  10.     Set session = New NotesSession
  11.     Set db = session.CurrentDatabase
  12.     Set note = session.DocumentContext
  13.     Set item = note.GetFirstItem("Body")
  14.     
  15.     Set docNew = New Notesdocument(db)
  16.     docNew.Form = "Memo"
  17.     Call item.copyitemtodocument(docNew, "")
  18.     docNew.SendTo = sForward
  19.     docNew.From = " " & note.From(0)
  20.     docNew.Principal = " " & note.From(0)
  21.     docNew.Subject = note.Subject(0)
  22.     
  23.     Call docNew.Send(True) 
  24.     
  25. End Sub