Domino 9 und frühere Versionen > ND6: Entwicklung

Antwort mit Vorlage übernimmt keinen Anhang

<< < (3/5) > >>

waldt:
Hallo axel,

eine Entschuldigung ist wirklich nicht nötig, so wie du mir hier hilfst.

Der Anhang und Text werden nun übernommen. Klasse

Leider werden Subject und Absender nicht übernommen.
Fehlt da noch was aus dem anderen script?

Gruß
Thomas

klaussal:
..

Axel:
Hmm, dass könnte daran liegen, dass das Dokument jetzt im Backend erstellt wird und nicht mehr im Frontend mit ComposeDocument. Da muss jetzt noch was in den Code rein.


Woher kommen den Absender und Subject? Wahrscheinlich aus dem aktuellen Mail. Wo rufst du die Aktion auf? Ist eine Ansichtenaktion, oder eine Aktion im Dokument?

Axel

waldt:
Also ich habe deinen Zusatz für RTF noch nicht drin.

Ich habe die Aktion zur Zeit nur im Ordner Inbox.
In der maske habe ich das gleiche Problem.

@Klaus: Der Zusatz hat nicht funktioniert.

Hier das aktuelle Script:

Sub Click(Source As Button)
   Dim ws As New NotesUIWorkspace
   Dim session As New NotesSession
   Dim db As NotesDatabase
   Dim collection As notesdocumentcollection
   Dim replyToUIDoc As NotesUIDocument
   Dim replyToDoc As NotesDocument
   Dim stationeryDoc As NotesDocument
   Dim stationeryBodyItem As NotesRichTextItem
   
   Set db = session.CurrentDatabase
   
   Set collection = ws.Picklistcollection(PICKLIST_CUSTOM, False, db.server, db.filepath, "Stationery", "Select Stationery", "Please select stationery for new memo.")
   
   Set stationeryDoc = collection.getfirstdocument
   
   If Not stationeryDoc Is Nothing Then
      
      Set replyToDoc = New NotesDocument(db)
      replyToDoc.Form="Reply"
      
      Set stationeryBodyItem = stationeryDoc.getfirstitem("Body")
      Call replyToDoc.CopyItem( stationeryBodyItem, "Body" )
      
      Set replyToUIDoc = ws.EditDocument(True, replyToDoc)
      Call replyToUIDoc.Refresh(True)
   End If         
   
End Sub

Axel:
Für die Ansichtenaktion müsste es so aussehen:

Sub Click(Source As Button)
...
Dim mailcol As NotesDocumentCollection
Dim maildoc As NotesDocument
...

Set db = session.CurrentDatabase

Set mailcol = db.UnprocessedDocuments
If mailcol.Count = 0 Then
  Messagebox "Sie haben keinen Eintrag markiert", 48, "Antwort erstellen"
  Exit Sub
End If

If mailcol.Count > 1 Then
  Messagebox "Sie haben mehr als einen Eintrag markiert", 48, "Antwort erstellen"
  Exit Sub
End If

Set maildoc = mailcol.GetFirstDocument
....

....

Set replyToDoc = New NotesDocument(db)
replyToDoc.Form="Reply"

replytoDoc.Subject = maildoc.Subject
replytoDoc.SendTo = maildoc.From
....

....

End Sub

Für die Aktion innerhalb des Dokuments so:

Sub Click(Source As Button)
...
Dim mailuidoc As NotesUIDocument
Dim maildoc As NotesDocument
...

Set mailuidoc = ws.CurrentDocument
Set maildoc = mailuidoc.Document
....

....

Set replyToDoc = New NotesDocument(db)
replyToDoc.Form="Reply"

replytoDoc.Subject = maildoc.Subject
replytoDoc.SendTo = maildoc.From
....

....

End Sub


Axel


Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln