Domino 9 und frühere Versionen > Entwicklung

could'nt attach file

(1/4) > >>

D. Roth.:
Hallo ,

ich hab das Problem wenn ich eine Datei anhängen will, bekomm ich die Meldung "could'nt attach file"

--------Schnipp----------------
Dim db As NotesDatabase
Dim docNew As NotesDocument      
Dim object As NotesEmbeddedObject
Set docNew = m_db.CreateDocument      
docNew.Form = Form
Set rtitem = New NotesRichTextItem(docNew,Field)
Set object = rtitem.EmbedObject (EMBED_ATTACHMENT, "", m_PDFFileName)
Call docNew.Save(True,True)
--------Schnipp----------------

Driri:
1. Solange das Dokument nicht gespeichert wurde, gibts kein RTF. Also erst Save und dann RTF. Gibts diverse Diskussionen und Beispiele hier im Forum.

2. Was ist denn "m_PDFFileName" ? Ist nnirgendwo deklariert.


Wobei ich eh davon ausgehe, daß Punkt 1 das Problem ist.

D. Roth.:
Geht leider immer noch nicht ;-(

P.S   m_PDFFileName = "C:\temp\test.pdf"
        Form = "MyForm"

Dim db As NotesDatabase
Dim docNew As NotesDocument      
Dim object As NotesEmbeddedObject
Set docNew = m_db.CreateDocument      
docNew.Form = Form
Call docNew.Save(True,True)
Set rtitem = New NotesRichTextItem(docNew,Field)
Set object = rtitem.EmbedObject (EMBED_ATTACHMENT, "", m_PDFFileName)
Call docNew.Save(True,True)
Set  m_NotesPDFDocument  = docNew

koehlerbv:
Das mit dem "erst speichern" betrifft aber "nur" die weitere Verarbeitung im FrontEnd und hat mit dem Attach-Problem nichts zu tun.

Frage: Ist der FilePath überhaupt korrekt ?

Bernhard

D. Roth.:
Jo der File Pfad ist korrekt!!

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln