Domino 9 und frühere Versionen > Entwicklung
Mail Attachment in eine Neues Dokument kopieren
D. Roth.:
Mail Attachment in eine Neues Dokument kopieren , hat jemand eine Idee ?
Meine erste Idee war das Feld Body mit CopyItem zu koppeiren , aber wenn ich das mache zeigt es mir im neue Feld nichts an . Sonst noch Ideen
koehlerbv:
CopyItem kopiert ein Item in das gleiche Dokument, Du müsstest CopyItemToDocument verwenden.
Ob das allerdings bei Mails der beste Weg ist ? Dabei kopierst Du ja auch den gesamten anderen Inhalt des Body-Feldes mit ...
Bernhard
koehlerbv:
By the way: Ein paar mehr Infos über Deine Rahmenumstände wären auch nicht schlecht. Allein schon, ob Front- oder Backend - das macht eine Menge aus.
Bernhard
D. Roth.:
Dim getmail As GetMail
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim uidoc As Notesuidocument
Set db = s.CurrentDatabase
Dim BodyItem As NotesItem
Set uidoc = ws.currentdocument
Set doc = uidoc.document
Set getmail = New GetMAil
Call getmail.getBodyItem
Call getmail.getSubjectItem
doc.SaveOptions = 0
Call doc.save(True,True)
Call uidoc.close
Set ItemBody = doc.CopyItem( getmail.BodyItem ,"FrmDocContent" )
Set ItemBody = doc.CopyItem( getmail.SubjectItem, "FrmDocTitel" )
' Call getmail.BodyItem.CopyItemToDocument( doc, "FrmDocContent" )
Call doc.ComputeWithForm(False, False)
Call ws.EditDocument( True, doc )
doc.SaveOptions = 1
Call doc.save(True,True)
koehlerbv:
Dim getmail As GetMail Schlecht, ganz schlecht: Objektname = Klassenname !
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim uidoc As Notesuidocument
Set db = s.CurrentDatabase
Dim BodyItem As NotesItem
Set uidoc = ws.currentdocument
Set doc = uidoc.document
Set getmail = New GetMAil
Call getmail.getBodyItem
Call getmail.getSubjectItem
doc.SaveOptions = 0 Wozu ?
Call doc.save(True,True) Wozu ?
Call uidoc.close
Da haben wir es doch: Du kopierst die Items innerhalb des Dokuments doc - siehe mein erstes Posting
Set ItemBody = doc.CopyItem( getmail.BodyItem ,"FrmDocContent" )
Set ItemBody = doc.CopyItem( getmail.SubjectItem, "FrmDocTitel" )
' Call getmail.BodyItem.CopyItemToDocument( doc, "FrmDocContent" )
Call doc.ComputeWithForm(False, False)
Call ws.EditDocument( True, doc )
doc.SaveOptions = 1 Wozu ?
Call doc.save(True,True)
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln