Domino 9 und frühere Versionen > Entwicklung

Seiteneffect von CreateReminder

(1/3) > >>

Don Pasquale:
Hallo Leute,

ich nutze folgendes Skript (aus eknori´s Schatzkiste).
Es erstellt einen Eintrag im Kalender des Users.
Allerdings, und das würde ich gerne vrhindern, auch
einen Eintrag in ENTWÜRFE im MAILORDNER des Users.

Hat dazu jemand eine Idee ?

Ciao

Don Pasquale



Sub createReminder( dateTime As notesDateTime, JNAlarm As String, popUpStr As String, subjectStr As String, infoStr As String ,DocID As String)
   
   Dim ICON As NotesItem      
   Dim sess As New NotesSession
   Dim userMailDb As New NotesDatabase( "", "" )
   Dim reminderDoc As NotesDocument
   Dim DTItem As NotesItem
   Call userMailDb.OpenMail
   If userMailDb.IsOpen Then
      Set reminderDoc = New NotesDocument( userMailDb )
      Dim s As New NotesSession
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim doc As NotesDocument
      Dim rtItem As NotesRichTextItem
      Set db = s.CurrentDatabase
      Set view = db.GetView ("($AllDocID)")
      Set doc = view.GetDocumentByKey(DocID)
      
      
      Set Icon = New NotesItem ( reminderDoc , "_ViewIcon" , 83 ) ' Icon = Daumenhoch
      ICON.IsSummary = True  
      
      With reminderDoc
         .Form = "Appointment"
         .ReplaceItemValue "$Alarm", 1
         .ReplaceItemValue "$AlarmDescription", popUpStr
         .ReplaceItemValue "$AlarmMemoOptions", ""
         .ReplaceItemValue "$AlarmOffset", 0
         .ReplaceItemValue "$AlarmUnit", "M"
         .ReplaceItemValue "Location", ""
'         .ReplaceItemValue "ExcludeFromView", "D"
'         .ReplaceItemValue "ExcludeFromView", "E"
         .ReplaceItemValue "NoticeType", "R"
         .ReplaceItemValue "tmpDoNotProcess", "1"
         .Subject = subjectStr
         .Alarms = JNAlarm
         .CalendarDateTime = dateTime.lsLocalTime
         .StartDate = dateTime.lsLocaltime
         .StartTime = dateTime.lsLocaltime
         .StartDateTime = dateTime.lsLocaltime
         .EndDate = dateTime.lsLocaltime
         .EndTime = dateTime.lsLocaltime
         .EndDateTime = dateTime.lsLocaltime
         .AppointmentType = "4"
      End With
      Set rtitem = New NotesRichTextItem( reminderDoc, "Body" )
      Call rtitem.AddNewLine( 1 )
      Call rtitem.AppendText( infoStr )
      Call rtitem.AddNewLine( 3 )
      Call rtitem.AppendText( "Bitte klicken sie hier, um das Dokument zu öffnen --> " )
'      Call rtitem.AddTab( 1 )
      Call rtitem.AddTab( 2 )
      Call rtitem.AppendDocLink( doc, db.Title )
      reminderDoc.ComputeWithForm True,True
      reminderDoc.save True,False
      reminderDoc.PutInFolder( "$Alarms" )
      Print "Wiedervorlage erstellt"
   Else
      Print "Fehler: Kann die Maildatei nicht öffnen"
   End If
End Sub

ata:
... was macht NoticeType "R" ?...

ata

Don Pasquale:
Ich hab´s auskommentiert aber keine Wirkung festgestellt.

Ciao

Don Pasquale

ata:
... gibts in dem Dokument was mit STATIONARY, z.B. IsMailStationary

... wenn ja dann auf "0" setzen...

ata

Don Pasquale:
Hi ata,
Das ist die Maske Appointment im Mail50.nsf
aber nein, da gibt es nicht was Stationary heisst.
Da es in dem Code aber nicht vorkommt, nehme ich an
es handelt sich um einen Seiteneffekt im Mail50.nsf
und nicht in diesem Code.

Ciao

Don Pasquale


Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln