Guten Morgen,
Mein Script scheint irgendwie nicht zu funktionieren.
Habe schon alles mögliche versucht. Ziel wäre, E-mails von einer bestimmten Adresse oder mit bestimmten Betreff weiterzuleiten in Lotus Notes. Der Normale Lotus Notes Regel Agent wurde bei meiner Firma deaktiviert.
Vielen Dank fürs drüber schauen!
Sub Initialize
Const sForward = "Lorenzo Natale/Home-Office/Zurich"
Dim session As New NotesSession
Dim note As NotesDocument
Dim docNew As Notesdocument
Dim db As NotesDatabase
Dim item As NotesItem
If note.From(0) = "Philipp Hess/Home-Office/Zurich" Then
Set session = New NotesSession
Set db = session.CurrentDatabase
Set note = session.DocumentContext
Set item = note.GetFirstItem("Body")
Set docNew = New Notesdocument(db)
docNew.Form = "Memo"
Call item.copyitemtodocument(docNew, "")
docNew.SendTo = sForward
docNew.From = " " & note.From(0)
docNew.Principal = " " & note.From(0)
docNew.Subject = note.Subject(0)
Call docNew.Send(True)
End If
If note.Subject(0) = "Test" Then
Set session = New NotesSession
Set db = session.CurrentDatabase
Set note = session.DocumentContext
Set item = note.GetFirstItem("Body")
Set docNew = New Notesdocument(db)
docNew.Form = "Memo"
Call item.copyitemtodocument(docNew, "")
docNew.SendTo = sForward
docNew.From = " " & note.From(0)
docNew.Principal = " " & note.From(0)
docNew.Subject = note.Subject(0)
Call docNew.Send(True)
End If
End Sub